8ac5e011d6
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
19 lines
748 B
Nix
19 lines
748 B
Nix
{ lib, version, hostPlatform
|
|
, gnatboot ? null
|
|
, langAda ? false
|
|
, langJava ? false
|
|
, langGo }:
|
|
|
|
assert langJava -> lib.versionOlder version "7";
|
|
assert langAda -> gnatboot != null;
|
|
|
|
lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
|
|
export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
|
|
export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET"
|
|
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
|
|
export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET"
|
|
'' + lib.optionalString (lib.versionOlder version "7" && (langJava || langGo)) ''
|
|
export lib=$out;
|
|
'' + lib.optionalString langAda ''
|
|
export PATH=${gnatboot}/bin:$PATH
|
|
''
|