2019-04-04 14:48:49 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
2019-04-04 14:50:38 +02:00
|
|
|
, optimize ? false # impure
|
2019-04-04 14:48:49 +02:00
|
|
|
}:
|
2016-10-11 09:49:04 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "nauty-${version}";
|
2018-10-03 14:54:07 +02:00
|
|
|
version = "26r11";
|
2016-10-11 09:49:04 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://pallini.di.uniroma1.it/nauty${version}.tar.gz";
|
2018-10-03 14:54:07 +02:00
|
|
|
sha256 = "05z6mk7c31j70md83396cdjmvzzip1hqb88pfszzc6k4gy8h3m2y";
|
2016-10-11 09:49:04 +02:00
|
|
|
};
|
2018-12-08 21:58:45 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2019-04-04 14:50:38 +02:00
|
|
|
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"
|
|
|
|
];
|
2016-10-11 09:49:04 +02:00
|
|
|
buildInputs = [];
|
|
|
|
installPhase = ''
|
2018-12-08 21:58:45 +01:00
|
|
|
mkdir -p "$out"/{bin,share/doc/nauty} "$dev"/{lib,include/nauty}
|
2016-10-11 09:49:04 +02:00
|
|
|
|
2018-12-08 21:58:45 +01:00
|
|
|
find . -type f -perm -111 \! -name '*.*' \! -name configure -exec cp '{}' "$out/bin" \;
|
2016-10-11 09:49:04 +02:00
|
|
|
cp [Rr][Ee][Aa][Dd]* COPYRIGHT This* [Cc]hange* "$out/share/doc/nauty"
|
2018-12-08 21:58:45 +01:00
|
|
|
|
2019-04-04 14:48:49 +02:00
|
|
|
cp *.h "$dev/include/nauty"
|
2018-12-08 21:58:45 +01:00
|
|
|
for i in *.a; do
|
|
|
|
cp "$i" "$dev/lib/lib$i";
|
|
|
|
done
|
2016-10-11 09:49:04 +02:00
|
|
|
'';
|
2018-12-08 21:58:45 +01:00
|
|
|
checkTarget = "checks";
|
2019-04-04 14:48:49 +02:00
|
|
|
meta = with lib; {
|
2016-10-11 09:49:04 +02:00
|
|
|
inherit version;
|
|
|
|
description = ''Programs for computing automorphism groups of graphs and digraphs'';
|
2019-04-04 14:48:49 +02:00
|
|
|
license = licenses.asl20;
|
2019-04-04 14:54:31 +02:00
|
|
|
maintainers = with maintainers; [ raskin timokau ];
|
2019-04-04 14:48:49 +02:00
|
|
|
platforms = platforms.linux;
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://pallini.di.uniroma1.it/;
|
2016-10-11 09:49:04 +02:00
|
|
|
};
|
|
|
|
}
|