at v192 40 lines 1.1 kB view raw
1{stdenv, fetchurl, ocaml, findlib, opam, xmlm}: 2let 3 pname = "uucd"; 4 version = "2.0.0"; 5 webpage = "http://erratique.ch/software/${pname}"; 6 ocaml_version = (builtins.parseDrvName ocaml.name).version; 7in 8stdenv.mkDerivation rec { 9 10 name = "ocaml-${pname}-${version}"; 11 12 src = fetchurl { 13 url = "${webpage}/releases/${pname}-${version}.tbz"; 14 sha256 = "12lbrrdjwdxfa99pbg344dfkj51lr5d2ispcj7d7lwsqyxy6h57i"; 15 }; 16 17 buildInputs = [ ocaml findlib opam xmlm ]; 18 19 createFindlibDestdir = true; 20 21 unpackCmd = "tar xjf $src"; 22 23 buildPhase = "ocaml ./pkg/build.ml native=true native-dynlink=true"; 24 25 installPhase = '' 26 opam-installer --script --prefix=$out ${pname}.install > install.sh 27 sh install.sh 28 ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml_version}/site-lib/ 29 ''; 30 31 propagatedBuildInputs = [ xmlm ]; 32 33 meta = with stdenv.lib; { 34 description = "An OCaml module to decode the data of the Unicode character database from its XML representation"; 35 homepage = "${webpage}"; 36 platforms = ocaml.meta.platforms; 37 maintainers = [ maintainers.vbgl ]; 38 license = licenses.bsd3; 39 }; 40}