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