summary refs log tree commit diff
path: root/pkgs/tools/typesetting/patoline/default.nix
blob: a39105c83145feb675c046bc33969ea399a94a35 (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
48
49
50
51
{ stdenv, fetchurl, ncurses, mesa, freeglut, libzip, 
   ocaml, findlib, camomile, 
   dypgen, ocaml_sqlite3, camlzip, 
   lablgtk, camlimages, ocaml_cairo,
   lablgl, ocamlnet, cryptokit,
   ocaml_pcre }:

let
  ocaml_version = (builtins.parseDrvName ocaml.name).version;
in

stdenv.mkDerivation {
  name = "patoline-0.1";

  src = fetchurl {
    url = "http://lama.univ-savoie.fr/patoline/patoline-0.1.tar.bz";
    sha256 = "c5ac8dcb87ceecaf11876bd0dd425bd0f04d43265adc2cbcb1f1e82a78846d49";
  };

  createFindlibDestdir = true;
   
   buildInputs = [ ocaml findlib dypgen camomile ocaml_sqlite3 camlzip 
   lablgtk camlimages ocaml_cairo
   lablgl ocamlnet cryptokit
   ocaml_pcre ncurses mesa freeglut libzip ];

  propagatedbuildInputs = [ camomile 
   dypgen ocaml_sqlite3 camlzip 
   lablgtk camlimages ocaml_cairo
   lablgl ocamlnet cryptokit
   ocaml_pcre ncurses mesa freeglut libzip ];

  buildPhase = ''
    ocaml configure.ml \
       --prefix $out \
       --ocaml-libs $out/lib/ocaml/${ocaml_version}/site-lib \
       --ocamlfind-dir $out/lib/ocaml/${ocaml_version}/site-lib \
       --fonts-dir $out/share/patoline/fonts \
       --grammars-dir $out/share/patoline/grammars \
       --hyphen-dir $out/share/patoline/hyphen

    make
  '';

  
  meta = {
    homepage = http://patoline.com;
    description = "Patoline ocaml based typesetting system";
  };
}