diff --git a/pkgs/development/compilers/ghc/7.10.2.nix b/pkgs/development/compilers/ghc/7.10.2.nix index f71cd922c10d..064610c3557b 100644 --- a/pkgs/development/compilers/ghc/7.10.2.nix +++ b/pkgs/development/compilers/ghc/7.10.2.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv }: +{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv, binutils, coreutils }: let @@ -46,6 +46,15 @@ stdenv.mkDerivation rec { # that in turn causes GHCi to abort 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 = { homepage = "http://haskell.org/ghc"; description = "The Glasgow Haskell Compiler";