package.nix: factor out aws deps

Change-Id: If22e685fa6e49dccb08f9d01c83f9d1a49f88dac
This commit is contained in:
Qyriad 2024-03-03 21:16:24 -07:00
parent c4da6d6b69
commit b8622f351e
2 changed files with 10 additions and 9 deletions

View file

@ -197,12 +197,6 @@
buildPackages.doxygen
];
awsDeps = lib.optional (stdenv.isLinux || stdenv.isDarwin)
(aws-sdk-cpp.override {
apis = ["s3" "transfer"];
customMemoryManagement = false;
});
propagatedDeps = calledPackage.propagatedBuildInputs;
};
@ -387,8 +381,6 @@
nativeBuildInputs = comDeps.nativeBuildDeps;
buildInputs = comDeps.buildDeps
# There have been issues building these dependencies
++ lib.optionals (currentStdenv.hostPlatform == currentStdenv.buildPlatform) comDeps.awsDeps
++ lib.optionals finalAttrs.doCheck comDeps.checkDeps;
propagatedBuildInputs = comDeps.propagatedDeps;

View file

@ -4,6 +4,7 @@
buildPackages,
autoconf-archive,
autoreconfHook,
aws-sdk-cpp,
boehmgc,
nlohmann_json,
bison,
@ -72,6 +73,11 @@
]);
};
aws-sdk-cpp-nix = aws-sdk-cpp.override {
apis = [ "s3" "transfer" ];
customMemoryManagement = false;
};
in stdenv.mkDerivation (finalAttrs: {
name = "nix-${version}";
inherit version;
@ -115,7 +121,10 @@ in stdenv.mkDerivation (finalAttrs: {
libsodium
]
++ lib.optionals stdenv.isLinux [ libseccomp ]
++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid;
++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid
# There have been issues building these dependencies
# TODO(Qyriad): Should this also have && (stdenv.isLinux || stdenv.isDarwin), as upstream does?
++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) aws-sdk-cpp-nix;
checkInputs = [
gtest