2021-01-15 22:18:51 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, astring, pprint }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
if lib.versionOlder ocaml.version "4.02"
|
2020-04-24 23:36:52 +00:00
|
|
|
then throw "ocp-ocamlres is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-02-10 20:34:41 +00:00
|
|
|
pname = "ocaml${ocaml.version}-ocp-ocamlres";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "0.4";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OCamlPro";
|
|
|
|
repo = "ocp-ocamlres";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0smfwrj8qhzknhzawygxi0vgl2af4vyi652fkma59rzjpvscqrnn";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ];
|
|
|
|
buildInputs = [ astring pprint ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
createFindlibDestdir = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
installFlags = [ "BINDIR=$(out)/bin" ];
|
|
|
|
preInstall = "mkdir -p $out/bin";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Simple tool and library to embed files and directories inside OCaml executables";
|
2021-02-05 17:12:51 +00:00
|
|
|
homepage = "https://www.typerex.org/ocp-ocamlres.html";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = lib.licenses.lgpl3Plus;
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2022-06-16 17:23:12 +00:00
|
|
|
mainProgram = "ocp-ocamlres";
|
2021-02-05 17:12:51 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|