about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/uchar/default.nix
blob: 7d7d87af853282d7e0c62cbb74ecc28ba3f3dc44 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true, lib }:

stdenv.mkDerivation rec {
  pname = "ocaml${ocaml.version}-uchar";
  version = "0.0.2";

  src = fetchurl {
    url = "https://github.com/ocaml/uchar/releases/download/v${version}/uchar-${version}.tbz";
    sha256 = "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7";
  };

  nativeBuildInputs = [ ocaml ocamlbuild findlib ];
  buildInputs = [ findlib ocaml ocamlbuild ];
  buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${lib.boolToString withShared}";
  installPhase = "${opaline}/bin/opaline -libdir $OCAMLFIND_DESTDIR";
  configurePlatforms = [ ];

  meta = {
    description = "Compatibility library for OCaml’s Uchar module";
    inherit (ocaml.meta) platforms license;
    maintainers = [ lib.maintainers.vbgl ];
  };
}