11 # note: this is not technically an ocaml-module,
12 # but can be built with different compilers, so
13 # the ocamlPackages set is very useful.
16 pname = "ocaml-freestanding";
19 if lib.versionOlder ocaml.version "4.08" then
20 builtins.throw "${pname} is not available for OCaml ${ocaml.version}"
23 stdenv.mkDerivation rec {
24 name = "ocaml${ocaml.version}-${pname}-${version}";
28 src = fetchFromGitHub {
32 sha256 = "sha256:1mbyjzwcs64n7i3xkkyaxgl3r46drbl0gkqf3fqgm2kh3q03638l";
36 # get ocaml-src from the ocaml drv instead of via ocamlfind
37 mkdir -p "${src.name}/ocaml"
38 tar --strip-components=1 -xf ${ocaml.src} -C "${src.name}/ocaml"
43 ./configurable-binding.patch
53 propagatedBuildInputs = [ solo5 ];
57 env PKG_CONFIG_DEPS=solo5-bindings-${target} sh configure.sh
68 broken = true; # Not compatible with solo5 ≥ 0.7
69 description = "Freestanding OCaml runtime";
70 license = licenses.mit;
71 maintainers = [ maintainers.sternenseemann ];
72 homepage = "https://github.com/mirage/ocaml-freestanding";
73 platforms = builtins.map ({ arch, os }: "${arch}-${os}") (