mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 02:05:51 +03:00
aws-sdk-cpp: fix cross-OS crosscompilation (#133182)
The TARGET_ARCH cmake variable is used to specify the host OS, which if unspecified defaults to the same as the build OS. So to crosscompile aws-sdk-cpp to another OS, the TARGET_ARCH variable must be specified. Example hydra failure: https://hydra.nixos.org/build/149290553/nixlog/3
This commit is contained in:
parent
bf906eaf04
commit
d63e4e2367
@ -7,6 +7,14 @@
|
||||
customMemoryManagement ? true
|
||||
}:
|
||||
|
||||
let
|
||||
host_os = if stdenv.hostPlatform.isDarwin then "APPLE"
|
||||
else if stdenv.hostPlatform.isAndroid then "ANDROID"
|
||||
else if stdenv.hostPlatform.isWindows then "WINDOWS"
|
||||
else if stdenv.hostPlatform.isLinux then "LINUX"
|
||||
else throw "Unknown host OS";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aws-sdk-cpp";
|
||||
version = "1.8.130";
|
||||
@ -49,6 +57,7 @@ stdenv.mkDerivation rec {
|
||||
"-DENABLE_TESTING=OFF"
|
||||
"-DCURL_HAS_H2=1"
|
||||
"-DCURL_HAS_TLS_PROXY=1"
|
||||
"-DTARGET_ARCH=${host_os}"
|
||||
] ++ lib.optional (apis != ["*"])
|
||||
"-DBUILD_ONLY=${lib.concatStringsSep ";" apis}";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user