mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
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:
parent
48eea20e69
commit
d1fc5370e9
@ -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 = ''
|
||||
|
@ -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 = ''
|
||||
|
@ -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 = ''
|
||||
|
@ -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 = ''
|
||||
|
@ -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 = ''
|
||||
|
@ -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 = ''
|
||||
|
@ -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 = ''
|
||||
|
@ -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 = ''
|
||||
|
@ -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 = ''
|
||||
|
@ -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 = ''
|
||||
|
@ -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
|
||||
|
@ -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 = ''
|
||||
|
@ -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 = ''
|
||||
|
@ -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 = ''
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
'';
|
||||
|
||||
|
@ -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}"
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user