nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 21.05 22 lines 799 B view raw
1{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true, lib }: 2 3stdenv.mkDerivation { 4 name = "ocaml${ocaml.version}-uchar-0.0.2"; 5 6 src = fetchurl { 7 url = "https://github.com/ocaml/uchar/releases/download/v0.0.2/uchar-0.0.2.tbz"; 8 sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"; 9 }; 10 11 nativeBuildInputs = [ ocaml ocamlbuild findlib ]; 12 buildInputs = [ findlib ocaml ocamlbuild ]; 13 buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${lib.boolToString withShared}"; 14 installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR"; 15 configurePlatforms = []; 16 17 meta = { 18 description = "Compatibility library for OCamls Uchar module"; 19 inherit (ocaml.meta) platforms license; 20 maintainers = [ lib.maintainers.vbgl ]; 21 }; 22}