nixpkgs/pkgs/by-name/na/nauty/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.6 KiB
Nix
Raw Normal View History

2019-04-04 12:48:49 +00:00
{ stdenv
, lib
, fetchurl
}:
2016-10-11 07:49:04 +00:00
stdenv.mkDerivation rec {
pname = "nauty";
2024-03-07 14:13:52 +00:00
version = "2.8.8";
2022-05-27 23:20:10 +00:00
2016-10-11 07:49:04 +00:00
src = fetchurl {
2024-03-07 14:13:52 +00:00
url = "https://pallini.di.uniroma1.it/nauty${builtins.replaceStrings ["."] ["_"] version}.tar.gz";
sha256 = "sha256-FZ0hVoEKa7JAQQzWHrZBrdhQiNnxXIiM2qN7hoH5Kc4=";
2016-10-11 07:49:04 +00:00
};
2022-05-27 23:20:10 +00:00
2018-12-08 20:58:45 +00:00
outputs = [ "out" "dev" ];
2022-05-27 23:20:10 +00:00
configureFlags = [
2019-04-04 12:50:38 +00: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
2022-05-27 23:20:10 +00:00
"--enable-generic" # don't use -march=native
"--${if stdenv.hostPlatform.sse4_2Support then "enable" else "disable"}-popcnt"
"--${if stdenv.hostPlatform.sse4_aSupport then "enable" else "disable"}-clz"
];
2022-05-27 23:20:10 +00:00
2016-10-11 07:49:04 +00:00
installPhase = ''
2018-12-08 20:58:45 +00:00
mkdir -p "$out"/{bin,share/doc/nauty} "$dev"/{lib,include/nauty}
2016-10-11 07:49:04 +00:00
2018-12-08 20:58:45 +00:00
find . -type f -perm -111 \! -name '*.*' \! -name configure -exec cp '{}' "$out/bin" \;
2016-10-11 07:49:04 +00: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 12:48:49 +00: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 07:49:04 +00:00
'';
2022-05-27 23:20:10 +00:00
2018-12-08 20:58:45 +00:00
checkTarget = "checks";
2022-05-27 23:20:10 +00:00
2019-04-04 12:48:49 +00:00
meta = with lib; {
description = "Programs for computing automorphism groups of graphs and digraphs";
2019-04-04 12:48:49 +00:00
license = licenses.asl20;
maintainers = teams.sage.members;
platforms = platforms.unix;
2020-05-20 12:59:30 +00: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.
2024-03-07 14:13:52 +00:00
changelog = "https://pallini.di.uniroma1.it/changes24-28.txt";
homepage = "https://pallini.di.uniroma1.it/";
2016-10-11 07:49:04 +00:00
};
}