nixpkgs/pkgs/applications/science/math/polymake/default.nix

52 lines
1.4 KiB
Nix
Raw Normal View History

2021-01-15 14:21:58 +01:00
{ lib, stdenv, fetchurl
2021-07-25 18:24:58 +02:00
, perl, gmp, mpfr, flint, boost
2018-11-19 08:50:02 +01:00
, bliss, ppl, singular, cddlib, lrs, nauty
2021-07-25 18:24:58 +02:00
, ninja, ant, openjdk
2018-11-19 08:50:02 +01:00
, perlPackages
, makeWrapper
}:
2021-07-25 18:24:58 +02:00
# 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.
2018-11-19 08:50:02 +01:00
stdenv.mkDerivation rec {
pname = "polymake";
2021-07-25 18:24:58 +02:00
version = "4.4";
2018-11-19 08:50:02 +01:00
src = fetchurl {
2021-07-25 18:24:58 +02:00
# "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-2nF5F2xznI77pl2TslrxA8HLpw4fmzVnPOM8N3kOwJE=";
2018-11-19 08:50:02 +01:00
};
buildInputs = [
2021-07-25 18:24:58 +02:00
perl gmp mpfr flint boost
2018-11-19 08:50:02 +01:00
bliss ppl singular cddlib lrs nauty
openjdk
2021-07-25 18:24:58 +02:00
] ++ (with perlPackages; [
JSON TermReadLineGnu TermReadKey XMLSAX
2018-11-19 08:50:02 +01:00
]);
nativeBuildInputs = [
makeWrapper ninja ant perl
];
2019-11-05 00:23:36 +01:00
ninjaFlags = [ "-C" "build/Opt" ];
2018-11-19 08:50:02 +01:00
postInstall = ''
for i in "$out"/bin/*; do
wrapProgram "$i" --prefix PERL5LIB : "$PERL5LIB"
done
'';
2021-07-25 18:24:58 +02:00
meta = with lib; {
2018-11-19 08:50:02 +01:00
description = "Software for research in polyhedral geometry";
2021-07-25 18:24:58 +02:00
license = licenses.gpl2Plus;
maintainers = teams.sage.members;
platforms = platforms.linux;
2018-11-19 08:50:02 +01:00
homepage = "https://www.polymake.org/doku.php";
};
}