diff options
author | Dan Peebles <pumpkin@me.com> | 2017-02-02 02:18:26 +0100 |
---|---|---|
committer | Dan Peebles <pumpkin@me.com> | 2017-02-02 02:18:42 +0100 |
commit | d34ee526a814a6231ec2d400d86fea6d26d450bd (patch) | |
tree | d0ad90e6825fa23f40626c30edcee5757b6fb137 /pkgs/development/libraries/aws-sdk-cpp | |
parent | 6bb4e6dba3d31a74d23454028fdb47894c4554e3 (diff) | |
download | nixpkgs-d34ee526a814a6231ec2d400d86fea6d26d450bd.tar nixpkgs-d34ee526a814a6231ec2d400d86fea6d26d450bd.tar.gz nixpkgs-d34ee526a814a6231ec2d400d86fea6d26d450bd.tar.bz2 nixpkgs-d34ee526a814a6231ec2d400d86fea6d26d450bd.tar.lz nixpkgs-d34ee526a814a6231ec2d400d86fea6d26d450bd.tar.xz nixpkgs-d34ee526a814a6231ec2d400d86fea6d26d450bd.tar.zst nixpkgs-d34ee526a814a6231ec2d400d86fea6d26d450bd.zip |
aws-sdk-cpp: fix on darwin
The LD_LIBRARY_PATH variable does nothing on Darwin, but DYLD_LIBRARY_PATH does the same thing, so splice in the right variable based on which system we're working on.
Diffstat (limited to 'pkgs/development/libraries/aws-sdk-cpp')
-rw-r--r-- | pkgs/development/libraries/aws-sdk-cpp/default.nix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix index 54d490b77af..6a18ff3ed24 100644 --- a/pkgs/development/libraries/aws-sdk-cpp/default.nix +++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix @@ -5,7 +5,14 @@ customMemoryManagement ? true }: -stdenv.mkDerivation rec { +let + loaderVar = + if stdenv.isLinux + then "LD_LIBRARY_PATH" + else if stdenv.isDarwin + then "DYLD_LIBRARY_PATH" + else throw "Unsupported system!"; +in stdenv.mkDerivation rec { name = "aws-sdk-cpp-${version}"; version = "1.0.48"; @@ -29,11 +36,12 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + # Behold the escaping nightmare below on loaderVar o.O preBuild = '' # Ensure that the unit tests can find the *.so files. for i in testing-resources aws-cpp-sdk-*; do - export LD_LIBRARY_PATH=$(pwd)/$i:$LD_LIBRARY_PATH + export ${loaderVar}=$(pwd)/$i:''${${loaderVar}} done ''; |