2022-12-28 21:21:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, gmp
|
|
|
|
, mpfr
|
|
|
|
, flint
|
|
|
|
, boost
|
|
|
|
, bliss
|
|
|
|
, ppl
|
|
|
|
, singular
|
|
|
|
, cddlib
|
|
|
|
, lrs
|
|
|
|
, nauty
|
|
|
|
, ninja
|
|
|
|
, ant
|
|
|
|
, openjdk
|
2023-08-10 07:59:29 +00:00
|
|
|
, perl536Packages
|
2020-04-24 23:36:52 +00:00
|
|
|
, makeWrapper
|
|
|
|
}:
|
2023-08-10 07:59:29 +00:00
|
|
|
let
|
|
|
|
# log says: polymake does not work with perl 5.37 or newer;
|
|
|
|
perlPackages = perl536Packages;
|
|
|
|
inherit (perlPackages) perl;
|
|
|
|
in
|
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";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "4.10";
|
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";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-YDiyZtbUC76ZVe3oRtzPRBfkEU+qh+d1ZWFhzUyi+Pg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
ninja
|
|
|
|
ant
|
|
|
|
perl
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2022-12-28 21:21:41 +00:00
|
|
|
perl
|
|
|
|
gmp
|
|
|
|
mpfr
|
|
|
|
flint
|
|
|
|
boost
|
|
|
|
bliss
|
|
|
|
ppl
|
|
|
|
singular
|
|
|
|
cddlib
|
|
|
|
lrs
|
|
|
|
nauty
|
2020-04-24 23:36:52 +00:00
|
|
|
openjdk
|
2021-08-08 23:34:03 +00:00
|
|
|
] ++ (with perlPackages; [
|
2022-12-28 21:21:41 +00:00
|
|
|
JSON
|
|
|
|
TermReadLineGnu
|
|
|
|
TermReadKey
|
|
|
|
XMLSAX
|
2020-04-24 23:36:52 +00:00
|
|
|
]);
|
|
|
|
|
|
|
|
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";
|
2022-12-28 21:21:41 +00:00
|
|
|
homepage = "https://www.polymake.org/doku.php";
|
|
|
|
changelog = "https://github.com/polymake/polymake/blob/V${version}/ChangeLog";
|
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
|
|
|
};
|
|
|
|
}
|