2021-01-11 12:49:15 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, astring, pprint }:
|
2018-03-28 09:20:56 +01:00
|
|
|
|
2021-01-11 12:49:15 +00:00
|
|
|
if !lib.versionAtLeast ocaml.version "4.02"
|
2018-03-28 09:20:56 +01:00
|
|
|
then throw "ocp-ocamlres is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
2017-06-30 23:23:21 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-01-21 00:24:35 +00:00
|
|
|
name = "ocaml${ocaml.version}-ocp-ocamlres-${version}";
|
|
|
|
version = "0.4";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "OCamlPro";
|
|
|
|
repo = "ocp-ocamlres";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0smfwrj8qhzknhzawygxi0vgl2af4vyi652fkma59rzjpvscqrnn";
|
|
|
|
};
|
2017-06-30 23:23:21 +01:00
|
|
|
|
2021-01-21 00:24:35 +00:00
|
|
|
buildInputs = [ ocaml findlib astring pprint ];
|
|
|
|
createFindlibDestdir = true;
|
2017-06-30 23:23:21 +01:00
|
|
|
|
2021-01-21 00:24:35 +00:00
|
|
|
installFlags = [ "BINDIR=$(out)/bin" ];
|
|
|
|
preInstall = "mkdir -p $out/bin";
|
2017-06-30 23:23:21 +01:00
|
|
|
|
2021-01-21 00:24:35 +00:00
|
|
|
meta = {
|
|
|
|
description = "A simple tool and library to embed files and directories inside OCaml executables";
|
|
|
|
license = lib.licenses.lgpl3Plus;
|
|
|
|
homepage = "https://www.typerex.org/ocp-ocamlres.html";
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
2017-06-30 23:23:21 +01:00
|
|
|
}
|