nixpkgs/pkgs/development/compilers/ghc/7.8.4.nix
Peter Simons df76eb1268 ghc: revert "propagate 'gmp' and 'ncurses' to ensure users can link the 'haskeline' library, etc."
I thought that [1] could be fixed by ensuring that ncurses is available in the
environment (because ghc exports it as a propagateBuildInput), and indeed that
change fixed *some* build failures we've had before. However, the same error
still occurs with other packages, like hledger [2] and Agda [3]. Frankly, I
have no idea why those packages fail and others don't. But clearly the fix was
inadequate, so I'm reverting commit a8076c76.

[1] https://github.com/NixOS/nixpkgs/issues/5616
[2] http://hydra.cryp.to/build/372451/nixlog/1/raw
[2] http://hydra.cryp.to/build/373161/nixlog/1/raw
2015-01-14 22:24:33 +01:00

45 lines
1.5 KiB
Nix

{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
stdenv.mkDerivation rec {
version = "7.8.4";
name = "ghc-${version}";
src = fetchurl {
url = "http://www.haskell.org/ghc/dist/7.8.4/${name}-src.tar.xz";
sha256 = "1i4254akbb4ym437rf469gc0m40bxm31blp6s1z1g15jmnacs6f3";
};
buildInputs = [ ghc perl gmp ncurses ];
enableParallelBuilding = true;
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
DYNAMIC_BY_DEFAULT = NO
'';
preConfigure = ''
echo "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
'';
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" "--keep-file-symbols" ];
meta = with stdenv.lib; {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = [ maintainers.marcweber maintainers.andres maintainers.simons ];
inherit (ghc.meta) license;
# Filter old "i686-darwin" platform which is unsupported these days.
platforms = filter (x: elem x platforms.all) ghc.meta.platforms;
# Disable Darwin builds: <https://github.com/NixOS/nixpkgs/issues/2689>.
hydraPlatforms = filter (x: !elem x platforms.darwin) meta.platforms;
};
}