1{ stdenv, fetchurl, ocaml, findlib, opam }:
2
3let
4 inherit (stdenv.lib) getVersion versionAtLeast;
5
6 pname = "uucp";
7 version = "0.9.1";
8 webpage = "http://erratique.ch/software/${pname}";
9in
10
11assert versionAtLeast (getVersion ocaml) "4.00";
12
13stdenv.mkDerivation {
14
15 name = "ocaml-${pname}-${version}";
16
17 src = fetchurl {
18 url = "${webpage}/releases/${pname}-${version}.tbz";
19 sha256 = "0mbrh5fi2b9a4bl71p7hfs0wwbw023ww44n20x0syxn806wjlrkm";
20 };
21
22 buildInputs = [ ocaml findlib opam ];
23
24 createFindlibDestdir = true;
25
26 unpackCmd = "tar xjf $src";
27
28 buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
29
30 installPhase = ''
31 opam-installer --script --prefix=$out ${pname}.install | sh
32 ln -s $out/lib/${pname} $out/lib/ocaml/${getVersion ocaml}/site-lib/${pname}
33 '';
34
35 meta = with stdenv.lib; {
36 description = "An OCaml library providing efficient access to a selection of character properties of the Unicode character database";
37 homepage = "${webpage}";
38 platforms = ocaml.meta.platforms;
39 license = licenses.bsd3;
40 maintainers = [ maintainers.vbgl ];
41 };
42}