package.nix: factor out the remaining dependency lists

Change-Id: Ie2ab8296d807da6a389017d316d9aae0285263bd
This commit is contained in:
Qyriad 2024-03-04 21:12:41 -07:00
parent b8622f351e
commit ee09e6d506
2 changed files with 17 additions and 13 deletions

View file

@ -374,18 +374,15 @@
name = "nix-${version}";
inherit version;
src = nixSrc;
VERSION_SUFFIX = versionSuffix;
outputs = [ "out" "dev" "doc" ];
nativeBuildInputs = comDeps.nativeBuildDeps;
buildInputs = comDeps.buildDeps
++ lib.optionals finalAttrs.doCheck comDeps.checkDeps;
propagatedBuildInputs = comDeps.propagatedDeps;
disallowedReferences = [ boost ];
inherit (comDeps.calledPackage)
src
VERSION_SUFFIX
outputs
nativeBuildInputs
buildInputs
propagatedBuildInputs
disallowedReferences
;
preConfigure = lib.optionalString (! currentStdenv.hostPlatform.isStatic)
''

View file

@ -124,7 +124,10 @@ in stdenv.mkDerivation (finalAttrs: {
++ 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;
++ lib.optional (stdenv.hostPlatform == stdenv.buildPlatform) aws-sdk-cpp-nix
# FIXME(Qyriad): This is how the flake.nix version does it, but this is cursed.
++ lib.optionals (finalAttrs.doCheck or true) finalAttrs.checkInputs
;
checkInputs = [
gtest
@ -136,6 +139,10 @@ in stdenv.mkDerivation (finalAttrs: {
nlohmann_json
];
disallowedReferences = [
boost
];
# FIXME: Used to make checkInputs accessible from outside the derivation args
# during the refactor.
passthru.finalAttrs = finalAttrs;