about summary refs log tree commit diff
path: root/pkgs/applications/science/math
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2019-05-05 19:12:12 +0000
committerGitHub <noreply@github.com>2019-05-05 19:12:12 +0000
commit7770495cd7c6431bd4b1ac6eadbae4e51479538b (patch)
treeae6489d5293cb1c74834db045accaa0dff9fdf15 /pkgs/applications/science/math
parent24debf74ef5c6e7799a5bc7edc4b2d6eae8e3c07 (diff)
parent091de095c92ab1d2932ec9dd5e810ea2575e2432 (diff)
downloadnixlib-7770495cd7c6431bd4b1ac6eadbae4e51479538b.tar
nixlib-7770495cd7c6431bd4b1ac6eadbae4e51479538b.tar.gz
nixlib-7770495cd7c6431bd4b1ac6eadbae4e51479538b.tar.bz2
nixlib-7770495cd7c6431bd4b1ac6eadbae4e51479538b.tar.lz
nixlib-7770495cd7c6431bd4b1ac6eadbae4e51479538b.tar.xz
nixlib-7770495cd7c6431bd4b1ac6eadbae4e51479538b.tar.zst
nixlib-7770495cd7c6431bd4b1ac6eadbae4e51479538b.zip
Merge pull request #59148 from volth/gcc.arch.v3
compilation for particular x86_64 architecture
Diffstat (limited to 'pkgs/applications/science/math')
-rw-r--r--pkgs/applications/science/math/nauty/default.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/applications/science/math/nauty/default.nix b/pkgs/applications/science/math/nauty/default.nix
index 7351de53cfce..226e13c004d7 100644
--- a/pkgs/applications/science/math/nauty/default.nix
+++ b/pkgs/applications/science/math/nauty/default.nix
@@ -1,7 +1,6 @@
 { stdenv
 , lib
 , fetchurl
-, optimize ? false # impure
 }:
 stdenv.mkDerivation rec {
   name = "nauty-${version}";
@@ -11,13 +10,15 @@ stdenv.mkDerivation rec {
     sha256 = "05z6mk7c31j70md83396cdjmvzzip1hqb88pfszzc6k4gy8h3m2y";
   };
   outputs = [ "out" "dev" ];
-  configureFlags = lib.optionals (!optimize) [
+  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
-    "--disable-popcnt"
-    "--disable-clz"
-  ];
+    "default"        = [ "--disable-clz" "--disable-popcnt" ];
+    "westmere"       = [ "--disable-clz" ];
+    "sandybridge"    = [ "--disable-clz" ];
+    "ivybridge"      = [ "--disable-clz" ];
+  }.${stdenv.hostPlatform.platform.gcc.arch or "default"} or [];
   buildInputs = [];
   installPhase = ''
     mkdir -p "$out"/{bin,share/doc/nauty} "$dev"/{lib,include/nauty}