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