Merge branch 'staging'
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -60,9 +60,11 @@ stdenv.mkDerivation rec {
|
||||
# On Linux, use patchelf to modify the executables so that they can
|
||||
# find editline/gmp.
|
||||
stdenv.lib.optionalString stdenv.isLinux ''
|
||||
mkdir -p "$out/lib"
|
||||
ln -sv "${ncurses}/lib/libncurses.so" "$out/lib/libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5"
|
||||
find . -type f -perm +100 \
|
||||
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
|
||||
--set-rpath "$out/lib:${gmp}/lib" {} \;
|
||||
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
for prog in ld ar gcc strip ranlib; do
|
||||
|
||||
Reference in New Issue
Block a user