1{stdenv, fetchurl, ocaml, findlib, opam}:
2let
3 pname = "uunf";
4 version = "0.9.3";
5 webpage = "http://erratique.ch/software/${pname}";
6 ocaml_version = (builtins.parseDrvName ocaml.name).version;
7in
8
9assert stdenv.lib.versionAtLeast ocaml_version "3.12";
10
11stdenv.mkDerivation rec {
12
13 name = "ocaml-${pname}-${version}";
14
15 src = fetchurl {
16 url = "${webpage}/releases/${pname}-${version}.tbz";
17 sha256 = "16cgjy1m0m61srv1pmlc3gr0y40kd4724clvpagdnz68raz4zmn0";
18 };
19
20 buildInputs = [ ocaml findlib opam ];
21
22 createFindlibDestdir = true;
23
24 unpackCmd = "tar xjf $src";
25
26 buildPhase = "./pkg/build true false";
27
28 installPhase = ''
29 opam-installer --script --prefix=$out ${pname}.install > install.sh
30 sh install.sh
31 ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml_version}/site-lib/
32 '';
33
34 meta = with stdenv.lib; {
35 description = "An OCaml module for normalizing Unicode text";
36 homepage = "${webpage}";
37 platforms = ocaml.meta.platforms;
38 license = licenses.bsd3;
39 maintainers = [ maintainers.vbgl ];
40 };
41}