2018-04-04 16:09:38 +01:00
|
|
|
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, oasis, ocaml_optcomp, camlp4
|
|
|
|
, num
|
|
|
|
}:
|
2015-02-28 15:48:16 +00:00
|
|
|
|
2018-04-04 16:09:38 +01:00
|
|
|
let param =
|
|
|
|
if stdenv.lib.versionAtLeast ocaml.version "4.03"
|
|
|
|
then {
|
|
|
|
version = "0.8.1";
|
|
|
|
sha256 = "03vzrybdpjydbpil97zmir71kpsn2yxkjnzysma7fvybk8ll4zh9";
|
|
|
|
buildInputs = [ num ];
|
|
|
|
} else {
|
|
|
|
version = "0.7.1";
|
|
|
|
sha256 = "0gg3nr3iic4rwqrcc0qvfm9x0x57zclvdsnpy0z8rv2fl5isbzms";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
let inherit (param) version; in
|
2014-05-17 11:52:37 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "ocsigen-deriving";
|
|
|
|
inherit version;
|
2015-02-28 15:48:16 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://github.com/ocsigen/deriving/archive/${version}.tar.gz";
|
2018-04-04 16:09:38 +01:00
|
|
|
inherit (param) sha256;
|
|
|
|
};
|
2014-11-06 00:44:33 +00:00
|
|
|
|
2018-04-04 16:09:38 +01:00
|
|
|
buildInputs = [ ocaml findlib ocamlbuild oasis ocaml_optcomp camlp4 ]
|
|
|
|
++ (param.buildInputs or []);
|
2014-05-17 11:52:37 +01:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/ocsigen/deriving";
|
2014-05-17 11:52:37 +01:00
|
|
|
description = "Extension to OCaml for deriving functions from type declarations";
|
2014-11-06 00:44:33 +00:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2015-12-24 17:49:07 +00:00
|
|
|
platforms = ocaml.meta.platforms or [];
|
2015-02-28 15:48:16 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [
|
|
|
|
gal_bolle vbgl
|
2014-05-17 11:52:37 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|