2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2021-08-08 23:34:03 +00:00
|
|
|
, perl, gmp, mpfr, flint, boost
|
2020-04-24 23:36:52 +00:00
|
|
|
, bliss, ppl, singular, cddlib, lrs, nauty
|
2021-08-08 23:34:03 +00:00
|
|
|
, ninja, ant, openjdk
|
2020-04-24 23:36:52 +00:00
|
|
|
, perlPackages
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
|
|
|
|
2021-08-08 23:34:03 +00: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.
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "polymake";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "4.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-08 23:34:03 +00: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";
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-QjpE3e8R6uqEV6sV3V2G3beovMbJuxF3b54pWNfc+dA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-08-08 23:34:03 +00:00
|
|
|
perl gmp mpfr flint boost
|
2020-04-24 23:36:52 +00:00
|
|
|
bliss ppl singular cddlib lrs nauty
|
|
|
|
openjdk
|
2021-08-08 23:34:03 +00:00
|
|
|
] ++ (with perlPackages; [
|
|
|
|
JSON TermReadLineGnu TermReadKey XMLSAX
|
2020-04-24 23:36:52 +00:00
|
|
|
]);
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper ninja ant perl
|
|
|
|
];
|
|
|
|
|
|
|
|
ninjaFlags = [ "-C" "build/Opt" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for i in "$out"/bin/*; do
|
|
|
|
wrapProgram "$i" --prefix PERL5LIB : "$PERL5LIB"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Software for research in polyhedral geometry";
|
2021-08-08 23:34:03 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = teams.sage.members;
|
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.polymake.org/doku.php";
|
|
|
|
};
|
|
|
|
}
|