2019-04-04 13:48:49 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
}:
|
2016-10-11 08:49:04 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "nauty";
|
2020-05-19 23:23:00 +01:00
|
|
|
version = "27r1";
|
2016-10-11 08:49:04 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://pallini.di.uniroma1.it/nauty${version}.tar.gz";
|
2020-12-02 19:14:55 +00:00
|
|
|
sha256 = "0xsfqfcknbd6g6wzpa5l7crmmk3bf3zjh37rhylq6b20dqcmvjkn";
|
2016-10-11 08:49:04 +01:00
|
|
|
};
|
2018-12-08 20:58:45 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
2020-08-05 03:32:41 +01:00
|
|
|
configureFlags = [
|
2019-04-04 13:50:38 +01:00
|
|
|
# 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
|
2020-08-05 03:32:41 +01:00
|
|
|
"--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-popcnt"
|
|
|
|
"--${if stdenv.hostPlatform.sse4_aSupport then "enable" else "disable"}-clz"
|
|
|
|
];
|
2016-10-11 08:49:04 +01:00
|
|
|
installPhase = ''
|
2018-12-08 20:58:45 +00:00
|
|
|
mkdir -p "$out"/{bin,share/doc/nauty} "$dev"/{lib,include/nauty}
|
2016-10-11 08:49:04 +01:00
|
|
|
|
2018-12-08 20:58:45 +00:00
|
|
|
find . -type f -perm -111 \! -name '*.*' \! -name configure -exec cp '{}' "$out/bin" \;
|
2016-10-11 08:49:04 +01:00
|
|
|
cp [Rr][Ee][Aa][Dd]* COPYRIGHT This* [Cc]hange* "$out/share/doc/nauty"
|
2018-12-08 20:58:45 +00:00
|
|
|
|
2019-04-04 13:48:49 +01:00
|
|
|
cp *.h "$dev/include/nauty"
|
2018-12-08 20:58:45 +00:00
|
|
|
for i in *.a; do
|
|
|
|
cp "$i" "$dev/lib/lib$i";
|
|
|
|
done
|
2016-10-11 08:49:04 +01:00
|
|
|
'';
|
2018-12-08 20:58:45 +00:00
|
|
|
checkTarget = "checks";
|
2019-04-04 13:48:49 +01:00
|
|
|
meta = with lib; {
|
2016-10-11 08:49:04 +01:00
|
|
|
inherit version;
|
|
|
|
description = ''Programs for computing automorphism groups of graphs and digraphs'';
|
2019-04-04 13:48:49 +01:00
|
|
|
license = licenses.asl20;
|
2020-11-18 20:29:24 +00:00
|
|
|
maintainers = teams.sage.members;
|
2019-09-15 09:48:07 +01:00
|
|
|
platforms = platforms.unix;
|
2020-05-20 13:59:30 +01:00
|
|
|
# I'm not sure if the filename will remain the same for future changelog or
|
|
|
|
# if it will track changes to minor releases. Lets see. Better than nothing
|
|
|
|
# in any case.
|
|
|
|
changelog = "http://pallini.di.uniroma1.it/changes24-27.txt";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://pallini.di.uniroma1.it/";
|
2016-10-11 08:49:04 +01:00
|
|
|
};
|
|
|
|
}
|