nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 16.09 41 lines 1.0 kB view raw
1{stdenv, fetchurl, ocaml, findlib, opam}: 2let 3 pname = "uutf"; 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 = "0xvq20knmq25902ijpbk91ax92bkymsqkbfklj1537hpn64lydhz"; 18 }; 19 20 buildInputs = [ ocaml findlib opam ]; 21 22 createFindlibDestdir = true; 23 24 unpackCmd = "tar xjf $src"; 25 26 buildPhase = "./pkg/build true"; 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 = "Non-blocking streaming Unicode codec for OCaml"; 36 homepage = "${webpage}"; 37 platforms = ocaml.meta.platforms or []; 38 license = licenses.bsd3; 39 maintainers = [ maintainers.vbgl ]; 40 }; 41}