ghc: Fix compatability with new versions of ncurses

This commit is contained in:
William A. Kennington III 2015-08-11 12:16:10 -07:00
parent b1ed04ad1d
commit 6c43640410

View file

@ -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/libncursesw.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