nixpkgs/pkgs/development/ocaml-modules/uchar/default.nix
Ulrik Strid a13cdfe520 ocamlPackages tree-wide: Move buildInputs that should be nativeBuildInputs
To keep this for the future we also strictDeps where possible, including for janePackages, topkg, oasis and ocamlbuild.
This makes some closures significantly smaller and makes cross compilation easier
2022-02-24 14:39:27 +01:00

26 lines
807 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ 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 ];
strictDeps = true;
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 OCamls Uchar module";
inherit (ocaml.meta) platforms license;
maintainers = [ lib.maintainers.vbgl ];
};
}