localPackages.vasp: use system-features to limit build

This commit is contained in:
陈浩南 2024-02-27 12:21:44 +08:00
parent bee788f30d
commit dc0ac2a333
2 changed files with 5 additions and 2 deletions

View File

@ -54,6 +54,7 @@ let
mkdir -p $out/bin
for i in std gam ncl; do cp bin/vasp_$i $out/bin/vasp-$i; done
'';
requiredSystemFeatures = [ "nvhpcarch-${nvhpcArch}" ];
};
startScript = version: writeScript "vasp-nvidia-${version}"
''

View File

@ -57,13 +57,15 @@ inputs:
}
# marches
{
nix.settings.system-features = map
nix.settings.system-features =
(map
(march: "gccarch-${march}")
(
if nix.marches == null then
(with inputs.config.nixos.system.nixpkgs; if march == null then [] else [ march ])
else nix.marches
);
))
++ (with inputs.config.nixos.system.nixpkgs; if march == null then [] else [ "nvhpcArch-${march}" ]);
}
# includeBuildDependencies
{