1{
2 lib,
3 fetchurl,
4 buildDunePackage,
5 ocaml,
6}:
7
8lib.throwIf (lib.versionAtLeast ocaml.version "5.0") "facile is not available for OCaml ≥ 5.0"
9
10 buildDunePackage
11 rec {
12 pname = "facile";
13 version = "1.1.4";
14
15 src = fetchurl {
16 url = "https://github.com/Emmanuel-PLF/facile/releases/download/${version}/facile-${version}.tbz";
17 sha256 = "0jqrwmn6fr2vj2rrbllwxq4cmxykv7zh0y4vnngx29f5084a04jp";
18 };
19
20 doCheck = true;
21
22 duneVersion = if lib.versionAtLeast ocaml.version "4.12" then "2" else "1";
23 postPatch = lib.optionalString (duneVersion != "1") "dune upgrade";
24
25 meta = {
26 homepage = "http://opti.recherche.enac.fr/facile/";
27 license = lib.licenses.lgpl21Plus;
28 description = "Functional Constraint Library";
29 };
30 }