···587588 nix.systemFeatures = mkDefault (
589 [ "nixos-test" "benchmark" "big-parallel" "kvm" ] ++
590+ optionals (pkgs.hostPlatform.platform ? gcc.arch) (
591+ # a builder can run code for `platform.gcc.arch` and inferior architectures
592+ [ "gccarch-${pkgs.hostPlatform.platform.gcc.arch}" ] ++
593+ map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${pkgs.hostPlatform.platform.gcc.arch}
000000594 )
595 );
596
+4-6
pkgs/applications/science/math/nauty/default.nix
···10 sha256 = "1nym0p2djws8ylkpr0kgpxfa6fxdlh46cmvz0gn5vd02jzgs0aww";
11 };
12 outputs = [ "out" "dev" ];
13- configureFlags = {
14 # Prevent nauty from sniffing some cpu features. While those are very
15 # widely available, it can lead to nasty bugs when they are not available:
16 # https://groups.google.com/forum/#!topic/sage-packaging/Pe4SRDNYlhA
17- default = [ "--disable-clz" "--disable-popcnt" ];
18- westmere = [ "--disable-clz" ];
19- sandybridge = [ "--disable-clz" ];
20- ivybridge = [ "--disable-clz" ];
21- }.${stdenv.hostPlatform.platform.gcc.arch or "default"} or [];
22 installPhase = ''
23 mkdir -p "$out"/{bin,share/doc/nauty} "$dev"/{lib,include/nauty}
24
···10 sha256 = "1nym0p2djws8ylkpr0kgpxfa6fxdlh46cmvz0gn5vd02jzgs0aww";
11 };
12 outputs = [ "out" "dev" ];
13+ configureFlags = [
14 # Prevent nauty from sniffing some cpu features. While those are very
15 # widely available, it can lead to nasty bugs when they are not available:
16 # https://groups.google.com/forum/#!topic/sage-packaging/Pe4SRDNYlhA
17+ "--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-popcnt"
18+ "--${if stdenv.hostPlatform.sse4_aSupport then "enable" else "disable"}-clz"
19+ ];
0020 installPhase = ''
21 mkdir -p "$out"/{bin,share/doc/nauty} "$dev"/{lib,include/nauty}
22
···27 # Detection script is broken
28 "-DQGLVIEWER_INCLUDE_DIR=${libqglviewer}/include/QGLViewer"
29 "-DG2O_BUILD_EXAMPLES=OFF"
30+ ] ++ lib.optionals stdenv.isx86_64 [
31+ "-DDO_SSE_AUTODETECT=OFF"
32+ "-DDISABLE_SSE3=${ if stdenv.hostPlatform.sse3Support then "OFF" else "ON"}"
33+ "-DDISABLE_SSE4_1=${if stdenv.hostPlatform.sse4_1Support then "OFF" else "ON"}"
34+ "-DDISABLE_SSE4_2=${if stdenv.hostPlatform.sse4_2Support then "OFF" else "ON"}"
35+ "-DDISABLE_SSE4_A=${if stdenv.hostPlatform.sse4_aSupport then "OFF" else "ON"}"
36+ ];
0003738 meta = with lib; {
39 description = "A General Framework for Graph Optimization";
+10-10
pkgs/development/libraries/givaro/default.nix
···1718 configureFlags = [
19 "--disable-optimization"
20- ] ++ stdenv.lib.optionals stdenv.isx86_64 {
21 # disable SIMD instructions (which are enabled *when available* by default)
22- default = [ "--disable-sse3" "--disable-ssse3" "--disable-sse41" "--disable-sse42" "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
23- westmere = [ "--disable-avx" "--disable-avx2" "--disable-fma" "--disable-fma4" ];
24- sandybridge = [ "--disable-avx2" "--disable-fma" "--disable-fma4" ];
25- ivybridge = [ "--disable-avx2" "--disable-fma" "--disable-fma4" ];
26- haswell = [ "--disable-fma4" ];
27- broadwell = [ "--disable-fma4" ];
28- skylake = [ "--disable-fma4" ];
29- skylake-avx512 = [ "--disable-fma4" ];
30- }.${stdenv.hostPlatform.platform.gcc.arch or "default"};
3132 # On darwin, tests are linked to dylib in the nix store, so we need to make
33 # sure tests run after installPhase.
···1718 configureFlags = [
19 "--disable-optimization"
20+ ] ++ stdenv.lib.optionals stdenv.isx86_64 [
21 # disable SIMD instructions (which are enabled *when available* by default)
22+ "--${if stdenv.hostPlatform.sse3Support then "enable" else "disable"}-sse3"
23+ "--${if stdenv.hostPlatform.ssse3Support then "enable" else "disable"}-ssse3"
24+ "--${if stdenv.hostPlatform.sse4_1Support then "enable" else "disable"}-sse41"
25+ "--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-sse42"
26+ "--${if stdenv.hostPlatform.avxSupport then "enable" else "disable"}-avx"
27+ "--${if stdenv.hostPlatform.avx2Support then "enable" else "disable"}-avx2"
28+ "--${if stdenv.hostPlatform.fmaSupport then "enable" else "disable"}-fma"
29+ "--${if stdenv.hostPlatform.fma4Support then "enable" else "disable"}-fma4"
30+ ];
3132 # On darwin, tests are linked to dylib in the nix store, so we need to make
33 # sure tests run after installPhase.
···32 # do not set GCC's -march=xxx based on builder's /proc/cpuinfo
33 "-DUSE_OPTIMIZE_FOR_ARCHITECTURE=OFF"
34 # also avoid using builder's /proc/cpuinfo
35- ] ++
36- { westmere = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
37- sandybridge = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
38- ivybridge = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
39- haswell = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
40- broadwell = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
41- skylake = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
42- skylake-avx512 = [ "-DHAVE_SSE42=ON" "-DASM_OPTIMIZATIONS=ON" ];
43- }.${stdenv.hostPlatform.platform.gcc.arch or ""} or [ "-DHAVE_SSE42=OFF" "-DASM_OPTIMIZATIONS=OFF" ];
4445 enableParallelBuilding = true;
46
···32 # do not set GCC's -march=xxx based on builder's /proc/cpuinfo
33 "-DUSE_OPTIMIZE_FOR_ARCHITECTURE=OFF"
34 # also avoid using builder's /proc/cpuinfo
35+ "-DHAVE_SSE42=${if stdenv.hostPlatform.sse4_2Support then "ON" else "OFF"}"
36+ "-DASM_OPTIMIZATIONS=${if stdenv.hostPlatform.sse4_2Support then "ON" else "OFF"}"
37+ ];
0000003839 enableParallelBuilding = true;
40