nixpkgs/pkgs/by-name/na/nauty/package.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

57 lines
1.7 KiB
Nix

{
stdenv,
lib,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "nauty";
version = "2.8.8";
src = fetchurl {
url = "https://pallini.di.uniroma1.it/nauty${
builtins.replaceStrings [ "." ] [ "_" ] version
}.tar.gz";
sha256 = "sha256-FZ0hVoEKa7JAQQzWHrZBrdhQiNnxXIiM2qN7hoH5Kc4=";
};
outputs = [
"out"
"dev"
];
configureFlags = [
# 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
"--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"
];
installPhase = ''
mkdir -p "$out"/{bin,share/doc/nauty} "$dev"/{lib,include/nauty}
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"
for i in *.a; do
cp "$i" "$dev/lib/lib$i";
done
'';
checkTarget = "checks";
meta = with lib; {
description = "Programs for computing automorphism groups of graphs and digraphs";
license = licenses.asl20;
maintainers = teams.sage.members;
platforms = platforms.unix;
# 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 = "https://pallini.di.uniroma1.it/changes24-28.txt";
homepage = "https://pallini.di.uniroma1.it/";
};
}