idris: Wrap with IDRIS_CC
Previously idris used the C compiler from PATH for the C backend, which means that the results and whether it even succeeds can vary between systems (e.g. if a Nix-built Idris was used on a super old Linux system, the cc installed there might not even work for Idris' C). To make this more predictable, this commit sets the IDRIS_CC env var, which Idris will prefer over searching in PATH, to a Nix-provided gcc executable, given that it is not already set, so it's still possible to override.
This commit is contained in:
parent
d74419ee3e
commit
b6cfa372f0
@ -1,4 +1,4 @@
|
|||||||
{ symlinkJoin, makeWrapper, stdenv }: idris: { path, lib }:
|
{ symlinkJoin, makeWrapper, stdenv, gcc }: idris: { path, lib }:
|
||||||
|
|
||||||
symlinkJoin {
|
symlinkJoin {
|
||||||
name = idris.name;
|
name = idris.name;
|
||||||
@ -8,6 +8,7 @@ symlinkJoin {
|
|||||||
meta.platforms = idris.meta.platforms;
|
meta.platforms = idris.meta.platforms;
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/idris \
|
wrapProgram $out/bin/idris \
|
||||||
|
--run 'export IDRIS_CC=''${IDRIS_CC:-${stdenv.lib.getBin gcc}/bin/gcc}' \
|
||||||
--suffix PATH : ${ stdenv.lib.makeBinPath path } \
|
--suffix PATH : ${ stdenv.lib.makeBinPath path } \
|
||||||
--suffix LIBRARY_PATH : ${stdenv.lib.makeLibraryPath lib}
|
--suffix LIBRARY_PATH : ${stdenv.lib.makeLibraryPath lib}
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user