nauty: disable cpu feature detection

This commit is contained in:
Timo Kaufmann 2019-04-04 14:50:38 +02:00
parent 15045e6233
commit 7f22a42976

@ -1,6 +1,7 @@
{ stdenv { stdenv
, lib , lib
, fetchurl , fetchurl
, optimize ? false # impure
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "nauty-${version}"; name = "nauty-${version}";
@ -10,6 +11,13 @@ stdenv.mkDerivation rec {
sha256 = "05z6mk7c31j70md83396cdjmvzzip1hqb88pfszzc6k4gy8h3m2y"; sha256 = "05z6mk7c31j70md83396cdjmvzzip1hqb88pfszzc6k4gy8h3m2y";
}; };
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
configureFlags = lib.optionals (!optimize) [
# 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"
];
buildInputs = []; buildInputs = [];
installPhase = '' installPhase = ''
mkdir -p "$out"/{bin,share/doc/nauty} "$dev"/{lib,include/nauty} mkdir -p "$out"/{bin,share/doc/nauty} "$dev"/{lib,include/nauty}