2021-12-06 16:07:01 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ocaml
|
|
|
|
, findlib
|
|
|
|
, ocamlbuild
|
|
|
|
, oasis
|
|
|
|
, camlp4
|
2020-04-24 23:36:52 +00:00
|
|
|
, num
|
|
|
|
}:
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
if !lib.versionAtLeast ocaml.version "4.03"
|
|
|
|
then throw "ocsigen-deriving is not available of OCaml ${ocaml.version}"
|
|
|
|
else
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocaml${ocaml.version}-ocsigen-deriving";
|
|
|
|
version = "0.8.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ocsigen";
|
|
|
|
repo = "deriving";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256:09rp9mrr551na0nmclpxddlrkb6l2d7763xv14xfx467kff3z0wf";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild oasis camlp4 num ];
|
|
|
|
|
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/ocsigen/deriving";
|
|
|
|
description = "Extension to OCaml for deriving functions from type declarations";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.mit;
|
2021-12-06 16:07:01 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2021-01-15 22:18:51 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
2021-12-06 16:07:01 +00:00
|
|
|
gal_bolle
|
|
|
|
vbgl
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|