ghc: patch start scripts to add 'readelf' and 'cat' into $PATH
Fixes https://github.com/NixOS/nixpkgs/issues/8192.
This commit is contained in:
parent
6aa5502129
commit
d3ac5c534d
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv }:
|
{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv, binutils, coreutils }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -46,6 +46,15 @@ stdenv.mkDerivation rec {
|
|||||||
# that in turn causes GHCi to abort
|
# that in turn causes GHCi to abort
|
||||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# Patch scripts to include "readelf" and "cat" in $PATH.
|
||||||
|
for i in "$out/bin/"*; do
|
||||||
|
test ! -h $i || continue
|
||||||
|
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||||
|
sed -i -e '2i export PATH="$PATH:${binutils}/bin:${coreutils}/bin"' $i
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "http://haskell.org/ghc";
|
homepage = "http://haskell.org/ghc";
|
||||||
description = "The Glasgow Haskell Compiler";
|
description = "The Glasgow Haskell Compiler";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user