about summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2015-08-09 15:17:58 +0200
committerPeter Simons <simons@cryp.to>2015-08-09 15:17:58 +0200
commitd3ac5c534de18caa487ab3ee341f24a452027294 (patch)
tree2f56aba6f4ee7038df187b6c609e4960fdc93a42 /pkgs/development/compilers/ghc
parent6aa550212901485062446a563b7cfed6e60b044c (diff)
downloadnixlib-d3ac5c534de18caa487ab3ee341f24a452027294.tar
nixlib-d3ac5c534de18caa487ab3ee341f24a452027294.tar.gz
nixlib-d3ac5c534de18caa487ab3ee341f24a452027294.tar.bz2
nixlib-d3ac5c534de18caa487ab3ee341f24a452027294.tar.lz
nixlib-d3ac5c534de18caa487ab3ee341f24a452027294.tar.xz
nixlib-d3ac5c534de18caa487ab3ee341f24a452027294.tar.zst
nixlib-d3ac5c534de18caa487ab3ee341f24a452027294.zip
ghc: patch start scripts to add 'readelf' and 'cat' into $PATH
Fixes https://github.com/NixOS/nixpkgs/issues/8192.
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r--pkgs/development/compilers/ghc/7.10.2.nix11
1 files changed, 10 insertions, 1 deletions
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";