haskell.compiler.*: pass --with-curses-* flags again
We reuse the targetLibs logic for this since it is more or less the same
story. However, the terminfo library is only built when GHC is neither a
cross-compiler nor being cross-compiled. Therefore ncurses (if used)
will only ever come from pkgsHostTarget. In the other cases ncurses is
still passed via depsBuildBuild for the stage1 compiler.
This commit tries to resolve the problem that the package-db doesn't
include library and include dirs of ncurses for the terminfo package,
causing library loading and linking problems in downstream packages,
e.g. dhall-docs and dhall-toml. This problem was introduced in
4b00fbf163
. With this in mind, not passing
--with-curses-* – as long as the terminfo package isn't built – seems
fine.
This commit is contained in:
parent
273bbacaef
commit
f716fa5303
@ -228,7 +228,7 @@ let
|
||||
else pkgsHostTarget;
|
||||
in
|
||||
{
|
||||
inherit (basePackageSet) gmp;
|
||||
inherit (basePackageSet) gmp ncurses;
|
||||
# dynamic inherits are not possible in Nix
|
||||
libffi = basePackageSet.${libffi_name};
|
||||
};
|
||||
@ -394,6 +394,9 @@ stdenv.mkDerivation (rec {
|
||||
# `--with` flags for libraries needed for RTS linker
|
||||
configureFlags = [
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
] ++ lib.optionals enableTerminfo [
|
||||
"--with-curses-includes=${lib.getDev targetLibs.ncurses}/include"
|
||||
"--with-curses-libraries=${lib.getLib targetLibs.ncurses}/lib"
|
||||
] ++ lib.optionals (args.${libffi_name} != null) [
|
||||
"--with-system-libffi"
|
||||
"--with-ffi-includes=${targetLibs.libffi.dev}/include"
|
||||
|
@ -362,7 +362,8 @@ let
|
||||
(if hostPlatform != targetPlatform then targetPackages else pkgsHostTarget)
|
||||
elfutils
|
||||
gmp
|
||||
libffi;
|
||||
libffi
|
||||
ncurses;
|
||||
};
|
||||
|
||||
# Our Cabal compiler name
|
||||
@ -492,6 +493,9 @@ stdenv.mkDerivation ({
|
||||
# `--with` flags for libraries needed for RTS linker
|
||||
configureFlags = [
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
] ++ lib.optionals enableTerminfo [
|
||||
"--with-curses-includes=${lib.getDev targetLibs.ncurses}/include"
|
||||
"--with-curses-libraries=${lib.getLib targetLibs.ncurses}/lib"
|
||||
] ++ lib.optionals (libffi != null && !targetPlatform.isGhcjs) [
|
||||
"--with-system-libffi"
|
||||
"--with-ffi-includes=${targetLibs.libffi.dev}/include"
|
||||
|
@ -225,7 +225,8 @@ let
|
||||
inherit
|
||||
(if hostPlatform != targetPlatform then targetPackages else pkgsHostTarget)
|
||||
gmp
|
||||
libffi;
|
||||
libffi
|
||||
ncurses;
|
||||
};
|
||||
|
||||
in
|
||||
@ -407,6 +408,9 @@ stdenv.mkDerivation (rec {
|
||||
# `--with` flags for libraries needed for RTS linker
|
||||
configureFlags = [
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
] ++ lib.optionals enableTerminfo [
|
||||
"--with-curses-includes=${lib.getDev targetLibs.ncurses}/include"
|
||||
"--with-curses-libraries=${lib.getLib targetLibs.ncurses}/lib"
|
||||
] ++ lib.optionals (libffi != null) [
|
||||
"--with-system-libffi"
|
||||
"--with-ffi-includes=${targetLibs.libffi.dev}/include"
|
||||
|
Loading…
Reference in New Issue
Block a user