git.iko.soy/typeable/nixpkgs
on master help sign in
ghc: paxmark all unwraped executables across the board

Shell glob works even as the exact set of executable (filenames) varries beween configuations. Need to skip non ELFs (e.g. shell scripts), however.

commit10b76a4caba015a5252cc88172d3b7d23b14d8f6 authorMoritz Angermann <moritz.angermann@gmail.com> dateMon 5 Mar 2018, 21:34 (9 years ago) parent1978115
4 files changed+16−12
pkgs/development/compilers/ghc/8.0.2.nix+4−3 pkgs/development/compilers/ghc/8.2.2.nix+4−3 pkgs/development/compilers/ghc/8.4.2.nix+4−3 pkgs/development/compilers/ghc/head.nix+4−3
pkgs/development/compilers/ghc/8.0.2.nix+4−3
@@ -164,10 +164,11 @@ stdenv.mkDerivation rec {
164164 # that in turn causes GHCi to abort
165165 stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
166166
167− # zsh and other shells are smart about `{ghc}` but bash isn't, and doesn't
168− # treat that as a unary `{x,y,z,..}` repetition.
169167 postInstall = ''
170− paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}
168+ for bin in "$out"/lib/${name}/bin/*; do
169+ isELF "$bin" || continue
170+ paxmark m "$bin"
171+ done
171172
172173 # Install the bash completion file.
173174 install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
pkgs/development/compilers/ghc/8.2.2.nix+4−3
@@ -179,10 +179,11 @@ stdenv.mkDerivation rec {
179179
180180 checkTarget = "test";
181181
182− # zsh and other shells are smart about `{ghc}` but bash isn't, and doesn't
183− # treat that as a unary `{x,y,z,..}` repetition.
184182 postInstall = ''
185− paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}
183+ for bin in "$out"/lib/${name}/bin/*; do
184+ isELF "$bin" || continue
185+ paxmark m "$bin"
186+ done
186187
187188 # Install the bash completion file.
188189 install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
pkgs/development/compilers/ghc/8.4.2.nix+4−3
@@ -171,10 +171,11 @@ stdenv.mkDerivation rec {
171171
172172 checkTarget = "test";
173173
174− # zsh and other shells are smart about `{ghc}` but bash isn't, and doesn't
175− # treat that as a unary `{x,y,z,..}` repetition.
176174 postInstall = ''
177− paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}
175+ for bin in "$out"/lib/${name}/bin/*; do
176+ isELF "$bin" || continue
177+ paxmark m "$bin"
178+ done
178179
179180 # Install the bash completion file.
180181 install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
pkgs/development/compilers/ghc/head.nix+4−3
@@ -169,10 +169,11 @@ stdenv.mkDerivation rec {
169169
170170 checkTarget = "test";
171171
172− # zsh and other shells are smart about `{ghc}` but bash isn't, and doesn't
173− # treat that as a unary `{x,y,z,..}` repetition.
174172 postInstall = ''
175− paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}
173+ for bin in "$out"/lib/${name}/bin/*; do
174+ isELF "$bin" || continue
175+ paxmark m "$bin"
176+ done
176177
177178 # Install the bash completion file.
178179 install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc