build/nix: Missing `libcap` dependency
Open 💬 4 comments Opened Mar 2, 2026 by javierhonduco
I am trying to build using nix but libcap is missing. I've verified that adding the patch below is enough
diff --git a/flake.nix b/flake.nix
index 1fd41c6f1..5aca004b8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -72,6 +72,7 @@
pkgs.cmake
pkgs.llvmPackages.clang
pkgs.llvmPackages.libclang.lib
+ pkgs.libcap
];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
4 Comments
Can confirm. Requesting fix.
Prepared a fix branch for this (
SergioChan:fix-nix-libpcap-13263) with the following changes:pkgs.libpcaptodevShells.default.buildInputsPKG_CONFIG_PATHto include both OpenSSL and libpcap pkg-config dirsCommit: https://github.com/SergioChan/codex/commit/2fce9ae4f8abf9dfe8ea6a034117ca7f6cf2a305
Patch (for easy cherry-pick):
@javierhonduco The issue title says
libpcapwhich is a different package, but yourpatch body has the right one.
@SergioChan Heads up — your commit adds
pkgs.libpcap(packet capture)instead of
pkgs.libcap(Linux capabilities). Easy to mix up given thetitle. Also the full commit link above returns 404 for some reason, but
the short hash works: https://github.com/SergioChan/codex/commit/2fce9ae
I put together a more complete fix building on both of your work
(
Acture:fix/nix-libpcap-13263):pkgs.libcaptodevShells.default.buildInputs(Linux-only,matching
default.nix)PKG_CONFIG_PATHto include both OpenSSL and libcapCommit: https://github.com/Acture/codex/commit/3ede411
Co-authored-by @javierhonduco and @SergioChan
```diff
@@ flake.nix @@
pkgs.llvmPackages.libclang.lib
];
Oops, well spotted. Just edited the title and contents