1 { stdenv, lib, fetchFromGitHub, ocaml, findlib, astring, pprint }:
3 if lib.versionOlder ocaml.version "4.02"
4 then throw "ocp-ocamlres is not available for OCaml ${ocaml.version}"
7 stdenv.mkDerivation rec {
8 pname = "ocaml${ocaml.version}-ocp-ocamlres";
10 src = fetchFromGitHub {
12 repo = "ocp-ocamlres";
14 sha256 = "0smfwrj8qhzknhzawygxi0vgl2af4vyi652fkma59rzjpvscqrnn";
17 nativeBuildInputs = [ ocaml findlib ];
18 buildInputs = [ astring pprint ];
22 createFindlibDestdir = true;
24 installFlags = [ "BINDIR=$(out)/bin" ];
25 preInstall = "mkdir -p $out/bin";
28 description = "A simple tool and library to embed files and directories inside OCaml executables";
29 homepage = "https://www.typerex.org/ocp-ocamlres.html";
30 license = lib.licenses.lgpl3Plus;
31 maintainers = [ lib.maintainers.vbgl ];
32 mainProgram = "ocp-ocamlres";
33 inherit (ocaml.meta) platforms;