summary refs log tree commit diff
path: root/pkgs/applications/science/math/polymake/default.nix
blob: 552881c5f1ad5b5a1fb38ed0469e37e2dc43a502 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ lib, stdenv, fetchurl
, ninja, libxml2, libxslt, readline, perl, gmp, mpfr, boost
, bliss, ppl, singular, cddlib, lrs, nauty
, ant, openjdk
, perlPackages
, makeWrapper
}:

stdenv.mkDerivation rec {
  pname = "polymake";
  version = "3.2.rc4";

  src = fetchurl {
    url = "https://polymake.org/lib/exe/fetch.php/download/polymake-3.2r4.tar.bz2";
    sha256 = "02jpkvy1cc6kc23vkn7nkndzr40fq1gkb3v257bwyi1h5d37fyqy";
  };

  buildInputs = [
    libxml2 libxslt readline perl gmp mpfr boost
    bliss ppl singular cddlib lrs nauty
    openjdk
  ] ++
  (with perlPackages; [
    XMLLibXML XMLLibXSLT XMLWriter TermReadLineGnu TermReadKey
  ]);

  nativeBuildInputs = [
    makeWrapper ninja ant perl
  ];

  ninjaFlags = [ "-C" "build/Opt" ];

  postInstall = ''
    for i in "$out"/bin/*; do
      wrapProgram "$i" --prefix PERL5LIB : "$PERL5LIB"
    done
  '';

  meta = {
    inherit version;
    description = "Software for research in polyhedral geometry";
    license = lib.licenses.gpl2 ;
    maintainers = [lib.maintainers.raskin];
    platforms = lib.platforms.linux;
    homepage = "https://www.polymake.org/doku.php";
  };
}