summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix
blob: 480ea6daf203f9d82d2e48c8b385a1ee11861c9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ stdenv
, lib
, fetchFromGitHub
, ocaml
, findlib
, ocamlbuild
, oasis
, camlp4
, num
}:

if !lib.versionAtLeast ocaml.version "4.03"
then throw "ocsigen-deriving is not available of OCaml ${ocaml.version}"
else

stdenv.mkDerivation rec {
  pname = "ocaml${ocaml.version}-ocsigen-deriving";
  version = "0.8.2";

  src = fetchFromGitHub {
    owner = "ocsigen";
    repo = "deriving";
    rev = version;
    sha256 = "sha256:09rp9mrr551na0nmclpxddlrkb6l2d7763xv14xfx467kff3z0wf";
  };

  createFindlibDestdir = true;

  nativeBuildInputs = [ ocaml findlib ocamlbuild oasis camlp4 ];
  buildInputs = [ oasis camlp4 ocamlbuild num ];

  strictDeps = true;

  meta = {
    homepage = "https://github.com/ocsigen/deriving";
    description = "Extension to OCaml for deriving functions from type declarations";
    license = lib.licenses.mit;
    inherit (ocaml.meta) platforms;
    maintainers = with lib.maintainers; [
      gal_bolle
      vbgl
    ];
  };


}