···18 "MANDIR=share/man/man1"
19 ];
200021 meta = with stdenv.lib; {
22 description = "A tool for controlling PaX flags on a per binary basis";
23 homepage = "https://pax.grsecurity.net";
···18 "MANDIR=share/man/man1"
19 ];
2021+ setupHook = ./setup-hook.sh;
22+23 meta = with stdenv.lib; {
24 description = "A tool for controlling PaX flags on a per binary basis";
25 homepage = "https://pax.grsecurity.net";
···10, setupScript ? ./setup.sh
1112, extraBuildInputs ? []
13-14-, skipPaxMarking ? false
15}:
1617let
···55 setup = setupScript;
5657 inherit preHook initialPath gcc shell;
58-59- # Whether we should run paxctl to pax-mark binaries
60- needsPax = result.isLinux && !skipPaxMarking;
6162 propagatedUserEnvPkgs = [gcc] ++
63 lib.filter lib.isDerivation initialPath;
···180 isArm = system == "armv5tel-linux"
181 || system == "armv6l-linux"
182 || system == "armv7l-linux";
000183184 # For convenience, bring in the library functions in lib/ so
185 # packages don't have to do that themselves.
···10, setupScript ? ./setup.sh
1112, extraBuildInputs ? []
0013}:
1415let
···53 setup = setupScript;
5455 inherit preHook initialPath gcc shell;
0005657 propagatedUserEnvPkgs = [gcc] ++
58 lib.filter lib.isDerivation initialPath;
···175 isArm = system == "armv5tel-linux"
176 || system == "armv6l-linux"
177 || system == "armv7l-linux";
178+179+ # Whether we should run paxctl to pax-mark binaries.
180+ needsPax = isLinux;
181182 # For convenience, bring in the library functions in lib/ so
183 # packages don't have to do that themselves.
+3-16
pkgs/stdenv/generic/setup.sh
···337export NIX_BUILD_CORES
338339340-######################################################################
341-# Misc. helper functions.
342-343-344-# PaX-mark binaries
345-paxmark() {
346- local flags="$1"
347- shift
348-349- if [ -z "@needsPax@" ]; then
350- return
351- fi
352-353- paxctl -c "$@"
354- paxctl -zex -${flags} "$@"
355-}
356357358######################################################################
···337export NIX_BUILD_CORES
338339340+# Dummy implementation of the paxmark function. On Linux, this is
341+# overwritten by paxctl's setup hook.
342+paxmark() { true; }
0000000000000343344345######################################################################