ghc: pass explicit 'ncurses' path to ./configure instead of finding through the environment

Fixes https://github.com/NixOS/nixpkgs/issues/5616. For real this time!
This commit is contained in:
Peter Simons 2015-01-16 19:31:34 +01:00
parent 48eea20e69
commit d1fc5370e9
19 changed files with 52 additions and 9 deletions

View File

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -62,8 +62,9 @@ stdenv.mkDerivation rec {
'' else "");
configurePhase = ''
./configure --prefix=$out --with-gmp-libraries=${gmp}/lib --with-gmp-includes=${gmp}/include \
${if stdenv.isDarwin then "--with-gcc=${./gcc-clang-wrapper.sh}" else "--with-clang"}
./configure --prefix=$out \
--with-gmp-libraries=${gmp}/lib --with-gmp-includes=${gmp}/include \
${stdenv.lib.optionalString stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"}
'';
# Stripping combined with patchelf breaks the executables (they die

View File

@ -16,6 +16,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -16,6 +16,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'';
preConfigure = ''

View File

@ -22,7 +22,8 @@ in stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
'' + stdenv.lib.optionalString stdenv.isLinux ''
# Set ghcFlags for building ghc itself
SRC_HC_OPTS += ${ghcFlags}

View File

@ -16,6 +16,8 @@ stdenv.mkDerivation rec {
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
DYNAMIC_BY_DEFAULT = NO
'';

View File

@ -1,5 +1,17 @@
{ stdenv, fetchurl, ghc, perl, gmp, ncurses, happy, alex }:
let
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"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
DYNAMIC_BY_DEFAULT = NO
'';
in
stdenv.mkDerivation rec {
version = "7.10.0.20141222";
name = "ghc-${version}";
@ -9,10 +21,10 @@ stdenv.mkDerivation rec {
sha256 = "0nncvvwksqqz1d991jbag3b4174i275nn0psadriq5hi3px11dkl";
};
buildInputs = [ ghc perl ncurses happy alex ];
buildInputs = [ ghc perl ];
preConfigure = ''
echo >mk/build.mk "DYNAMIC_BY_DEFAULT = NO"
echo >mk/build.mk "${buildMK}"
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}"

View File

@ -16,7 +16,7 @@ self: super: {
directory = null;
filepath = null;
ghc-prim = null;
haskeline = self.haskeline_0_7_1_3; # GHC's version is broken: https://github.com/NixOS/nixpkgs/issues/5616.
haskeline = null;
haskell2010 = null;
haskell98 = null;
hoopl = null;
@ -28,7 +28,7 @@ self: super: {
process = null;
rts = null;
template-haskell = null;
terminfo = self.terminfo_0_4_0_0; # GHC's version is broken: https://github.com/NixOS/nixpkgs/issues/5616.
terminfo = null;
time = null;
unix = null;

View File

@ -16,7 +16,7 @@ self: super: {
directory = null;
filepath = null;
ghc-prim = null;
haskeline = self.haskeline_0_7_1_3; # GHC's version is broken: https://github.com/NixOS/nixpkgs/issues/5616.
haskeline = null;
haskell2010 = null;
haskell98 = null;
hoopl = null;
@ -28,7 +28,7 @@ self: super: {
process = null;
rts = null;
template-haskell = null;
terminfo = self.terminfo_0_4_0_0; # GHC's version is broken: https://github.com/NixOS/nixpkgs/issues/5616.
terminfo = null;
time = null;
transformers = null;
unix = null;
@ -42,6 +42,7 @@ self: super: {
mkDerivation = drv: super.mkDerivation (drv // { doCheck = false; });
transformers = super.transformers_0_4_2_0;
transformers-compat = disableCabalFlag super.transformers-compat "three";
haskeline = self.haskeline_0_7_1_3;
mtl = super.mtl_2_2_1;
})) (drv: {
jailbreak = true; # idris is scared of lens 4.7