From 8a2de701f7afb543fb8bd920351715bfabbe7706 Mon Sep 17 00:00:00 2001 From: Niklas Hambüchen Date: Sun, 4 Jul 2021 18:30:39 +0000 Subject: haskell.compiler.ghc8102Binary: Fix build on i686. The library override that was present in the code referred to a name that isn't even used in current GHC bindists. Tested with: NIX_PATH=nixpkgs=. nix-build --no-link -A haskell.compiler.ghc8102Binary --argstr system i686-linux --- pkgs/development/compilers/ghc/8.10.2-binary.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.2-binary.nix b/pkgs/development/compilers/ghc/8.10.2-binary.nix index 69708add3e1..760c2269868 100644 --- a/pkgs/development/compilers/ghc/8.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.2-binary.nix @@ -1,5 +1,6 @@ { lib, stdenv , fetchurl, perl, gcc +, ncurses5 , ncurses6, gmp, glibc, libiconv, numactl , llvmPackages @@ -58,7 +59,11 @@ let useLLVM = !stdenv.targetPlatform.isx86; libPath = lib.makeLibraryPath ([ - ncurses6 gmp + # The i686-linux bindist provided by GHC HQ is currently built on Debian 9, + # which link it against `libtinfo.so.5` (ncurses 5). + # Other bindists are linked `libtinfo.so.6` (ncurses 6). + (if stdenv.hostPlatform.system == "i686-linux" then ncurses5 else ncurses6) + gmp ] ++ lib.optional (stdenv.hostPlatform.isDarwin) libiconv ++ lib.optional (stdenv.hostPlatform.isAarch64) numactl); @@ -124,7 +129,6 @@ stdenv.mkDerivation rec { # Rename needed libraries and binaries, fix interpreter lib.optionalString stdenv.isLinux '' find . -type f -perm -0100 -exec patchelf \ - --replace-needed libncurses${lib.optionalString stdenv.is64bit "w"}.so.6 libncurses.so \ --interpreter ${glibcDynLinker} {} \; sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2 -- cgit 1.4.1