1 { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
3 lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
4 "ocamlify is not available for OCaml ${ocaml.version}"
6 stdenv.mkDerivation rec {
11 url = "https://forge.ocamlcore.org/frs/download.php/1209/${pname}-${version}.tar.gz";
12 sha256 = "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii";
17 nativeBuildInputs = [ ocaml findlib ocamlbuild ];
20 substituteInPlace src/ocamlify.ml --replace 'OCamlifyConfig.version' '"0.0.2"'
23 buildPhase = "ocamlbuild src/ocamlify.native";
27 mv _build/src/ocamlify.native $out/bin/ocamlify
33 homepage = "https://forge.ocamlcore.org/projects/ocamlmod/ocamlmod";
34 description = "Generate OCaml modules from source files";
35 platforms = ocaml.meta.platforms or [];
36 license = lib.licenses.lgpl21;
37 maintainers = with lib.maintainers; [