idrisPackages.idris-wrapper: Fix linking to gmp library
This has been broken since 5d18129ce8
,
which updated idris from 1.3.0 to 1.3.1, which included
https://github.com/idris-lang/Idris-dev/pull/4472 as the cause of the
error. I'm still not entirely sure why this broke it though.
This now way should be rather future proof, it uses NIX_CFLAGS to pass
gpm link flags to our CC wrapper directly. The
`NIX_CC_WRAPPER_${stdenv.cc.infixSalt}_TARGET_HOST` part I'm pretty sure
is needed for the CC wrapper to know that those CFLAGS are meant for the
cc running on the HOST.
This commit is contained in:
parent
7be93a4ca7
commit
cfd2e6731a
1 changed files with 4 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
{ lib, symlinkJoin, makeWrapper, idris-no-deps, gcc, gmp }:
|
||||
{ stdenv, lib, symlinkJoin, makeWrapper, idris-no-deps, gcc, gmp }:
|
||||
|
||||
symlinkJoin {
|
||||
inherit (idris-no-deps) name src meta;
|
||||
|
@ -7,6 +7,8 @@ symlinkJoin {
|
|||
postBuild = ''
|
||||
wrapProgram $out/bin/idris \
|
||||
--run 'export IDRIS_CC=''${IDRIS_CC:-${lib.getBin gcc}/bin/gcc}' \
|
||||
--suffix LIBRARY_PATH : ${lib.makeLibraryPath [ gmp ]}
|
||||
--set NIX_CC_WRAPPER_${stdenv.cc.infixSalt}_TARGET_HOST 1 \
|
||||
--prefix NIX_CFLAGS_COMPILE " " "-I${lib.getDev gmp}/include" \
|
||||
--prefix NIX_CFLAGS_LINK " " "-L${lib.getLib gmp}/lib"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue