mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-17 02:14:36 +00:00
13 lines
603 B
Nix
13 lines
603 B
Nix
|
{ lib, version, hostPlatform, langJava ? false, langGo }:
|
||
|
|
||
|
assert langJava -> lib.versionOlder version "7";
|
||
|
|
||
|
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;
|
||
|
''
|