@@ -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