nix.systemFeatures: minor refactor
This commit is contained in:
parent
3d3f83dc51
commit
5a2356cff1
|
@ -363,7 +363,6 @@ in
|
||||||
|
|
||||||
systemFeatures = mkOption {
|
systemFeatures = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [ ];
|
|
||||||
example = [ "kvm" "big-parallel" "gccarch-skylake" ];
|
example = [ "kvm" "big-parallel" "gccarch-skylake" ];
|
||||||
description = ''
|
description = ''
|
||||||
The supported features of a machine
|
The supported features of a machine
|
||||||
|
@ -488,11 +487,11 @@ in
|
||||||
/nix/var/nix/gcroots/tmp
|
/nix/var/nix/gcroots/tmp
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nix.systemFeatures = mkIf (pkgs.stdenv.isx86_64 && pkgs.hostPlatform.platform ? gcc.arch) (
|
nix.systemFeatures = mkDefault (
|
||||||
# can build for arch
|
[ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++
|
||||||
mkDefault (
|
optionals (pkgs.stdenv.isx86_64 && pkgs.hostPlatform.platform ? gcc.arch) (
|
||||||
[ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++
|
# a x86_64 builder can run code for `platform.gcc.arch` and minor architectures:
|
||||||
{ # can also run code for the following achritectures:
|
[ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++ {
|
||||||
"sandybridge" = [ "gccarch-westmere" ];
|
"sandybridge" = [ "gccarch-westmere" ];
|
||||||
"ivybridge" = [ "gccarch-westmere" "gccarch-sandybridge" ];
|
"ivybridge" = [ "gccarch-westmere" "gccarch-sandybridge" ];
|
||||||
"haswell" = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" ];
|
"haswell" = [ "gccarch-westmere" "gccarch-sandybridge" "gccarch-ivybridge" ];
|
||||||
|
|
Loading…
Reference in New Issue