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