diff options
author | Timo Kaufmann <timokau@zoho.com> | 2019-04-05 13:12:05 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-05 13:12:05 +0000 |
commit | 6662fbc822fed290922238819b658ea70cf27317 (patch) | |
tree | 3d65615ad1100fb2b3062e44e8abb5e85de5ad80 /pkgs/applications/science | |
parent | e129404b910fc8c717fff5ae1f001d7b5f63f889 (diff) | |
parent | 7f22a4297638c6d0ea5cfcbe3b83a011d1286c23 (diff) | |
download | nixpkgs-6662fbc822fed290922238819b658ea70cf27317.tar nixpkgs-6662fbc822fed290922238819b658ea70cf27317.tar.gz nixpkgs-6662fbc822fed290922238819b658ea70cf27317.tar.bz2 nixpkgs-6662fbc822fed290922238819b658ea70cf27317.tar.lz nixpkgs-6662fbc822fed290922238819b658ea70cf27317.tar.xz nixpkgs-6662fbc822fed290922238819b658ea70cf27317.tar.zst nixpkgs-6662fbc822fed290922238819b658ea70cf27317.zip |
Merge pull request #58961 from timokau/nauty-features
nauty: disable cpu feature detection
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/math/nauty/default.nix | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/pkgs/applications/science/math/nauty/default.nix b/pkgs/applications/science/math/nauty/default.nix index 5b431f41926..7351de53cfc 100644 --- a/pkgs/applications/science/math/nauty/default.nix +++ b/pkgs/applications/science/math/nauty/default.nix @@ -1,4 +1,8 @@ -{stdenv, fetchurl}: +{ stdenv +, lib +, fetchurl +, optimize ? false # impure +}: stdenv.mkDerivation rec { name = "nauty-${version}"; version = "26r11"; @@ -7,6 +11,13 @@ stdenv.mkDerivation rec { sha256 = "05z6mk7c31j70md83396cdjmvzzip1hqb88pfszzc6k4gy8h3m2y"; }; 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 = []; installPhase = '' mkdir -p "$out"/{bin,share/doc/nauty} "$dev"/{lib,include/nauty} @@ -14,18 +25,18 @@ stdenv.mkDerivation rec { find . -type f -perm -111 \! -name '*.*' \! -name configure -exec cp '{}' "$out/bin" \; cp [Rr][Ee][Aa][Dd]* COPYRIGHT This* [Cc]hange* "$out/share/doc/nauty" - cp *.h $dev/include/nauty + cp *.h "$dev/include/nauty" for i in *.a; do cp "$i" "$dev/lib/lib$i"; done ''; checkTarget = "checks"; - meta = { + meta = with lib; { inherit version; description = ''Programs for computing automorphism groups of graphs and digraphs''; - license = stdenv.lib.licenses.asl20; - maintainers = [stdenv.lib.maintainers.raskin]; - platforms = stdenv.lib.platforms.linux; + license = licenses.asl20; + maintainers = with maintainers; [ raskin timokau ]; + platforms = platforms.linux; homepage = http://pallini.di.uniroma1.it/; }; } |