libcap-with-captree: remove (upstreamed into main libcap)

This commit is contained in:
2025-01-22 20:57:46 +00:00
parent 74deec9bbf
commit b9237d9c46
2 changed files with 1 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
sane.programs.captree = { sane.programs.captree = {
packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.libcap-with-captree "captree"; packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.libcap "captree";
sandbox.keepPidsAndProc = true; sandbox.keepPidsAndProc = true;
}; };
} }

View File

@@ -1,22 +0,0 @@
# libcap nix package should eventually ship `captree`, but until then, patch it.
# this is a re-implementation of an outstanding PR, but in a way that doesn't force mass-rebuilds:
# - <https://github.com/NixOS/nixpkgs/pull/332399>
{
libcap,
go,
}: libcap.overrideAttrs (base: {
depsBuildBuild = base.depsBuildBuild ++ [ go ];
makeFlags = base.makeFlags ++ [
"GOLANG=yes"
''GOCACHE=''${TMPDIR}/go-cache''
"GOARCH=${go.GOARCH}"
"GOOS=${go.GOOS}"
];
postPatch = base.postPatch + ''
# disable cross compilation for artifacts which are run as part of the build
substituteInPlace go/Makefile \
--replace-fail '$(GO) run' 'GOOS= GOARCH= $(GO) run'
'';
})