about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/math/nauty
diff options
context:
space:
mode:
authorvolth <volth@volth.com>2020-08-05 02:32:41 +0000
committerAlyssa Ross <hi@alyssa.is>2020-11-27 13:28:22 +0000
commitbc030c028322c3797c351832ff2e41348351a223 (patch)
tree1338ec7ecc4c5d9941b419b1b83fe164e261f1b9 /nixpkgs/pkgs/applications/science/math/nauty
parent56a4b2b477a63be9bb1fd016dc9ccfc2bbebf600 (diff)
downloadnixlib-bc030c028322c3797c351832ff2e41348351a223.tar
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.gz
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.bz2
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.lz
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.xz
nixlib-bc030c028322c3797c351832ff2e41348351a223.tar.zst
nixlib-bc030c028322c3797c351832ff2e41348351a223.zip
gcc.arch: refactor, move tables under lib/
(cherry picked from commit cf7b63df5b9efdef4e8e1b3261d7040199f7e671)
Diffstat (limited to 'nixpkgs/pkgs/applications/science/math/nauty')
-rw-r--r--nixpkgs/pkgs/applications/science/math/nauty/default.nix10
1 files changed, 4 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/applications/science/math/nauty/default.nix b/nixpkgs/pkgs/applications/science/math/nauty/default.nix
index c1d408213b98..d75fc9731cdf 100644
--- a/nixpkgs/pkgs/applications/science/math/nauty/default.nix
+++ b/nixpkgs/pkgs/applications/science/math/nauty/default.nix
@@ -10,15 +10,13 @@ stdenv.mkDerivation rec {
     sha256 = "1nym0p2djws8ylkpr0kgpxfa6fxdlh46cmvz0gn5vd02jzgs0aww";
   };
   outputs = [ "out" "dev" ];
-  configureFlags = {
+  configureFlags = [
     # Prevent nauty from sniffing some cpu features. While those are very
     # widely available, it can lead to nasty bugs when they are not available:
     # https://groups.google.com/forum/#!topic/sage-packaging/Pe4SRDNYlhA
-    default        = [ "--disable-clz" "--disable-popcnt" ];
-    westmere       = [ "--disable-clz" ];
-    sandybridge    = [ "--disable-clz" ];
-    ivybridge      = [ "--disable-clz" ];
-  }.${stdenv.hostPlatform.platform.gcc.arch or "default"} or [];
+    "--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-popcnt"
+    "--${if stdenv.hostPlatform.sse4_aSupport then "enable" else "disable"}-clz"
+  ];
   installPhase = ''
     mkdir -p "$out"/{bin,share/doc/nauty} "$dev"/{lib,include/nauty}