about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/math/glsurf/default.nix
blob: 599d4bac8e76bdf218a273164a7e2767903294e7 (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
{ lib, stdenv, fetchurl, ocamlPackages, libGLU, libGL, freeglut
, libmysqlclient, mpfr, gmp, libtiff, libjpeg, libpng, giflib
}:

stdenv.mkDerivation {
  name = "glsurf-3.3.1";

  src = fetchurl {
    url = "https://raffalli.eu/~christophe/glsurf/glsurf-3.3.1.tar.gz";
    sha256 = "0w8xxfnw2snflz8wdr2ca9f5g91w5vbyp1hwlx1v7vg83d4bwqs7";
  };

  buildInputs = [ freeglut libGLU libGL libmysqlclient mpfr gmp
    libtiff libjpeg libpng giflib ]
  ++ (with ocamlPackages; [
    ocaml findlib ocaml_mysql lablgl camlimages_4_0 mlgmpidl
  ]);

  installPhase = ''
    mkdir -p $out/bin $out/share/doc/glsurf
    cp ./src/glsurf.opt $out/bin/glsurf
    cp ./doc/doc.pdf $out/share/doc/glsurf
    cp -r ./examples $out/share/doc/glsurf
  '';

  meta = {
    homepage = "https://raffalli.eu/~christophe/glsurf/";
    description = "A program to draw implicit surfaces and curves";
    license = lib.licenses.lgpl21;
  };
}