programs: strings: fix sandboxing

This commit is contained in:
Colin 2024-02-16 14:49:28 +00:00
parent 6aaa724abf
commit a909a93c29
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@
packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.binutils-unwrapped "bin/strings"; packageUnwrapped = pkgs.linkIntoOwnPackage pkgs.binutils-unwrapped "bin/strings";
sandbox.method = "landlock"; sandbox.method = "landlock";
sandbox.wrapperType = "wrappedDerivation"; sandbox.wrapperType = "inplace";
sandbox.autodetectCliPaths = "existing"; sandbox.autodetectCliPaths = "existing";
}; };
} }

View File

@ -12,6 +12,7 @@
} '' } ''
mkdir -p "$out/$(dirname "$item")" mkdir -p "$out/$(dirname "$item")"
cp -a "$fromPkg/$item" "$out/$item" cp -a "$fromPkg/$item" "$out/$item"
runHook postFixup
''; '';
linkIntoOwnPackage = pkg: path: runCommand "${pkg.pname or pkg.name}-${path}" { linkIntoOwnPackage = pkg: path: runCommand "${pkg.pname or pkg.name}-${path}" {
@ -20,6 +21,7 @@
} '' } ''
mkdir -p "$out/$(dirname "$item")" mkdir -p "$out/$(dirname "$item")"
ln -s "$fromPkg/$item" "$out/$item" ln -s "$fromPkg/$item" "$out/$item"
runHook postFixup
''; '';
# given some package, create a new package which symlinks every file of the original # given some package, create a new package which symlinks every file of the original