|
1 |
| -{ stdenv, fetchurl, ocaml, findlib, dypgen, bolt, ansiterminal, camlp4, |
| 1 | +{ stdenv, fetchurl, ocamlPackages, |
2 | 2 | buildBytecode ? true,
|
3 | 3 | buildNative ? true,
|
4 | 4 | installExamples ? true,
|
5 | 5 | installEmacsMode ? true }:
|
6 | 6 |
|
7 |
| -let inherit (stdenv.lib) getVersion versionAtLeast |
| 7 | +let inherit (stdenv.lib) versionAtLeast |
8 | 8 | optionals optionalString; in
|
9 | 9 |
|
10 |
| -assert versionAtLeast (getVersion ocaml) "3.07"; |
11 |
| -assert versionAtLeast (getVersion dypgen) "20080925"; |
12 |
| -assert versionAtLeast (getVersion bolt) "1.4"; |
| 10 | +let inherit (ocamlPackages) ocaml camlp4; in |
13 | 11 |
|
14 | 12 | assert buildBytecode || buildNative;
|
15 | 13 |
|
16 | 14 | stdenv.mkDerivation {
|
17 | 15 |
|
18 |
| - name = "acgtk-1.1"; |
| 16 | + name = "acgtk-1.3.1"; |
19 | 17 |
|
20 | 18 | src = fetchurl {
|
21 |
| - url = "http://www.loria.fr/equipes/calligramme/acg/software/acg-1.1-20140905.tar.gz"; |
22 |
| - sha256 = "1k1ldqg34bwmgdpmi9gry9czlsk85ycjxnkd25fhlf3mmgg4n9p6"; |
| 19 | + url = http://calligramme.loria.fr/acg/software/acg-1.3.1-20170303.tar.gz; |
| 20 | + sha256 = "1hhrf6bx2x2wbv5ldn4fnxhpr9lyrj3zh1vcnx8wf8f06ih4rzfq"; |
23 | 21 | };
|
24 | 22 |
|
25 |
| - buildInputs = [ ocaml findlib dypgen bolt ansiterminal camlp4 ]; |
| 23 | + buildInputs = with ocamlPackages; [ |
| 24 | + ocaml findlib camlp4 ansiterminal biniou bolt ocaml_cairo2 dypgen easy-format ocf yojson |
| 25 | + ]; |
26 | 26 |
|
27 | 27 | patches = [ ./install-emacs-to-site-lisp.patch
|
28 | 28 | ./use-nix-ocaml-byteflags.patch ];
|
29 | 29 |
|
30 | 30 | postPatch = stdenv.lib.optionalString (camlp4 != null) ''
|
31 | 31 | substituteInPlace src/Makefile.master.in \
|
32 |
| - --replace "+camlp4" "${camlp4}/lib/ocaml/${getVersion ocaml}/site-lib/camlp4/" |
| 32 | + --replace "+camlp4" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4/" |
33 | 33 | '';
|
34 | 34 |
|
35 | 35 | # The bytecode executable is dependent on the dynamic library provided by
|
36 | 36 | # ANSITerminal. We can use the -dllpath flag of ocamlc (analogous to
|
37 | 37 | # -rpath) to make sure that ocamlrun is able to link the library at
|
38 | 38 | # runtime and that Nix detects a runtime dependency.
|
39 |
| - NIX_OCAML_BYTEFLAGS = "-dllpath ${ansiterminal}/lib/ocaml/${getVersion ocaml}/site-lib/ANSITerminal"; |
| 39 | + NIX_OCAML_BYTEFLAGS = "-dllpath ${ocamlPackages.ansiterminal}/lib/ocaml/${ocaml.version}/site-lib/ANSITerminal"; |
40 | 40 |
|
41 | 41 | buildFlags = optionalString buildBytecode "byte"
|
42 | 42 | + " "
|
|
0 commit comments