2021-01-15 22:18:51 +00:00
|
|
|
{ stdenv, lib, fetchzip, ocaml, findlib, ocamlbuild, oasis, ocaml_optcomp, camlp4
|
2020-04-24 23:36:52 +00:00
|
|
|
, num
|
|
|
|
}:
|
|
|
|
|
|
|
|
let param =
|
2021-01-15 22:18:51 +00:00
|
|
|
if lib.versionAtLeast ocaml.version "4.03"
|
2020-04-24 23:36:52 +00:00
|
|
|
then {
|
|
|
|
version = "0.8.1";
|
|
|
|
sha256 = "03vzrybdpjydbpil97zmir71kpsn2yxkjnzysma7fvybk8ll4zh9";
|
|
|
|
buildInputs = [ num ];
|
|
|
|
} else {
|
|
|
|
version = "0.7.1";
|
|
|
|
sha256 = "0gg3nr3iic4rwqrcc0qvfm9x0x57zclvdsnpy0z8rv2fl5isbzms";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
let inherit (param) version; in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "ocsigen-deriving";
|
|
|
|
inherit version;
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/ocsigen/deriving/archive/${version}.tar.gz";
|
|
|
|
inherit (param) sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ ocaml findlib ocamlbuild oasis ocaml_optcomp camlp4 ]
|
|
|
|
++ (param.buildInputs or []);
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
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;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2021-01-15 22:18:51 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
2020-04-24 23:36:52 +00:00
|
|
|
gal_bolle vbgl
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|