mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-22 23:18:44 +08:00
localPackages.vasp: use system-features to limit build
This commit is contained in:
parent
bee788f30d
commit
dc0ac2a333
@ -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}"
|
||||
''
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user