nixpkgs/pkgs/by-name/po/polymake/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

81 lines
1.5 KiB
Nix

{ lib
, stdenv
, fetchurl
, gmp
, mpfr
, flint
, boost
, bliss
, ppl
, singular
, cddlib
, lrs
, nauty
, ninja
, ant
, openjdk
, perl
, perlPackages
, makeWrapper
}:
# polymake compiles its own version of sympol and atint because we
# don't have those packages. other missing optional dependencies:
# javaview, libnormaliz, scip, soplex, jreality.
stdenv.mkDerivation rec {
pname = "polymake";
version = "4.13";
src = fetchurl {
# "The minimal version is a packager friendly version which omits
# the bundled sources of cdd, lrs, libnormaliz, nauty and jReality."
url = "https://polymake.org/lib/exe/fetch.php/download/polymake-${version}-minimal.tar.bz2";
sha256 = "sha256-862s0GO56mDV6cN8YYP127dFiwyzSR66Pvw48gxWXOs=";
};
nativeBuildInputs = [
makeWrapper
ninja
ant
perl
];
buildInputs = [
perl
gmp
mpfr
flint
boost
bliss
ppl
singular
cddlib
lrs
nauty
openjdk
] ++ (with perlPackages; [
JSON
TermReadLineGnu
TermReadKey
XMLSAX
]);
ninjaFlags = [ "-C" "build/Opt" ];
postInstall = ''
for i in "$out"/bin/*; do
wrapProgram "$i" --prefix PERL5LIB : "$PERL5LIB"
done
'';
meta = with lib; {
description = "Software for research in polyhedral geometry";
homepage = "https://www.polymake.org/doku.php";
changelog = "https://github.com/polymake/polymake/blob/V${version}/ChangeLog";
license = licenses.gpl2Plus;
maintainers = teams.sage.members;
platforms = platforms.linux;
};
}