@@ -225,16 +225,16 @@ let
225
225
# `--with` flags for libraries needed for RTS linker
226
226
configureFlags = [
227
227
"--datadir=$doc/share/doc/ghc"
228
- ] ++ lib . optionals ( ! targetPlatform . isGhcjs && ! targetPlatform . isWasm && ! targetPlatform . isAndroid ) [ "--with-curses-includes=${ targetPackages . ncurses . dev } /include" "--with-curses-libraries=${ targetPackages . ncurses . out } /lib"
229
- ] ++ lib . optionals ( targetLibffi != null && ! targetPlatform . isGhcjs && ! targetPlatform . isWasm ) [ "--with-system-libffi" "--with-ffi-includes=${ targetLibffi . dev } /include" "--with-ffi-libraries=${ targetLibffi . out } /lib"
228
+ ] ++ lib . optionals ( ! targetPlatform . isGhcjs && ! targetPlatform . isWasm && ! targetPlatform . isAndroid ) [ "--with-curses-includes=${ lib . getDev targetPackages . ncurses } /include" "--with-curses-libraries=${ lib . getLib targetPackages . ncurses } /lib"
229
+ ] ++ lib . optionals ( targetLibffi != null && ! targetPlatform . isGhcjs && ! targetPlatform . isWasm ) [ "--with-system-libffi" "--with-ffi-includes=${ lib . getDev targetLibffi } /include" "--with-ffi-libraries=${ lib . getLib targetLibffi } /lib"
230
230
] ++ lib . optionals ( targetPlatform . isWasm ) [
231
231
"--with-system-libffi"
232
232
] ++ lib . optionals ( ! enableIntegerSimple && ! targetPlatform . isGhcjs && ! targetPlatform . isWasm ) [
233
- "--with-gmp-includes=${ targetGmp . dev } /include" "--with-gmp-libraries=${ targetGmp . out } /lib"
233
+ "--with-gmp-includes=${ lib . getDev targetGmp } /include" "--with-gmp-libraries=${ lib . getLib targetGmp } /lib"
234
234
] ++ lib . optionals ( targetPlatform == hostPlatform && hostPlatform . libc != "glibc" && ! targetPlatform . isWindows ) [
235
- "--with-iconv-includes=${ libiconv } /include" "--with-iconv-libraries=${ libiconv } /lib"
235
+ "--with-iconv-includes=${ lib . getDev libiconv } /include" "--with-iconv-libraries=${ lib . getLib libiconv } /lib"
236
236
] ++ lib . optionals ( targetPlatform != hostPlatform && ! targetPlatform . isGhcjs && ! targetPlatform . isWasm ) [
237
- "--with-iconv-includes=${ targetIconv } /include" "--with-iconv-libraries=${ targetIconv } /lib"
237
+ "--with-iconv-includes=${ lib . getDev targetIconv } /include" "--with-iconv-libraries=${ lib . getLib targetIconv } /lib"
238
238
] ++ lib . optionals ( targetPlatform != hostPlatform ) [
239
239
"--enable-bootstrap-with-devel-snapshot"
240
240
] ++ lib . optionals ( disableLargeAddressSpace ) [
261
261
;
262
262
263
263
# Splicer will pull out correct variations
264
- libDeps = platform : lib . optional ( enableTerminfo && ! targetPlatform . isGhcjs && ! targetPlatform . isWasm && ! targetPlatform . isAndroid ) [ targetPackages . ncurses targetPackages . ncurses . dev ]
264
+ libDeps = platform : lib . optional ( enableTerminfo && ! targetPlatform . isGhcjs && ! targetPlatform . isWasm && ! targetPlatform . isAndroid ) [ ( lib . getLib targetPackages . ncurses ) ( lib . getDev targetPackages . ncurses ) ]
265
265
++ lib . optional ( ! targetPlatform . isGhcjs ) targetLibffi
266
266
++ lib . optional ( ! enableIntegerSimple && ! targetPlatform . isGhcjs && ! targetPlatform . isWasm ) gmp
267
267
++ lib . optional ( platform . libc != "glibc" && ! targetPlatform . isWindows ) libiconv
@@ -487,8 +487,8 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
487
487
export RANLIB="${ targetCC . bintools . bintools } /bin/${ targetCC . bintools . targetPrefix } ranlib"
488
488
export READELF="${ targetCC . bintools . bintools } /bin/${ targetCC . bintools . targetPrefix } readelf"
489
489
export STRIP="${ bintoolsFor . strip } /bin/${ bintoolsFor . strip . targetPrefix } strip"
490
- export NIX_CFLAGS_COMPILE_FOR_BUILD+=" -I${ libffi . dev } /include -L${ libffi . out } /lib"
491
- export NIX_CFLAGS_COMPILE_FOR_TARGET+=" -I${ targetLibffi . dev } /include -L${ targetLibffi . out } /lib"
490
+ export NIX_CFLAGS_COMPILE_FOR_BUILD+=" -I${ lib . getDev libffi } /include -L${ lib . getLib libffi } /lib"
491
+ export NIX_CFLAGS_COMPILE_FOR_TARGET+=" -I${ lib . getDev targetLibffi } /include -L${ lib . getLib targetLibffi } /lib"
492
492
substituteInPlace compiler/GHC.hs --replace-fail "panic \"corrupted wasi-sdk installation\"" "pure \"${ targetPackages . wasilibc } \""
493
493
''
494
494
# GHC is a bit confused on its cross terminology, as these would normally be
0 commit comments