···1818 "MANDIR=share/man/man1"
1919 ];
20202121+ setupHook = ./setup-hook.sh;
2222+2123 meta = with stdenv.lib; {
2224 description = "A tool for controlling PaX flags on a per binary basis";
2325 homepage = "https://pax.grsecurity.net";
···1010, setupScript ? ./setup.sh
11111212, extraBuildInputs ? []
1313-1414-, skipPaxMarking ? false
1513}:
16141715let
···5553 setup = setupScript;
56545755 inherit preHook initialPath gcc shell;
5858-5959- # Whether we should run paxctl to pax-mark binaries
6060- needsPax = result.isLinux && !skipPaxMarking;
61566257 propagatedUserEnvPkgs = [gcc] ++
6358 lib.filter lib.isDerivation initialPath;
···180175 isArm = system == "armv5tel-linux"
181176 || system == "armv6l-linux"
182177 || system == "armv7l-linux";
178178+179179+ # Whether we should run paxctl to pax-mark binaries.
180180+ needsPax = isLinux;
183181184182 # For convenience, bring in the library functions in lib/ so
185183 # packages don't have to do that themselves.
+3-16
pkgs/stdenv/generic/setup.sh
···337337export NIX_BUILD_CORES
338338339339340340-######################################################################
341341-# Misc. helper functions.
342342-343343-344344-# PaX-mark binaries
345345-paxmark() {
346346- local flags="$1"
347347- shift
348348-349349- if [ -z "@needsPax@" ]; then
350350- return
351351- fi
352352-353353- paxctl -c "$@"
354354- paxctl -zex -${flags} "$@"
355355-}
340340+# Dummy implementation of the paxmark function. On Linux, this is
341341+# overwritten by paxctl's setup hook.
342342+paxmark() { true; }
356343357344358345######################################################################