Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildDunePackage,
4 fetchFromGitHub,
5 fetchpatch,
6 alcotest,
7 cmdliner,
8 ppx_deriving,
9 ppxlib,
10 result,
11 gitUpdater,
12}:
13
14buildDunePackage rec {
15 pname = "ppx_deriving_cmdliner";
16 version = "0.6.1";
17
18 minimalOCamlVersion = "4.11";
19
20 src = fetchFromGitHub {
21 owner = "hammerlab";
22 repo = pname;
23 rev = "v${version}";
24 sha256 = "sha256-/22KLQnxu3e2ZSca6ZLxTJDfv/rsmgCUkJnZC0RwRi8";
25 };
26
27 patches = [
28 # Ppxlib.0.26.0 compatibility
29 # remove when a new version is released
30 (fetchpatch {
31 url = "https://patch-diff.githubusercontent.com/raw/hammerlab/ppx_deriving_cmdliner/pull/50.patch";
32 sha256 = "sha256-FfUfEAsyobwZ99+s5sFAaCE6Xgx7jLr/q79OxDbGcvQ=";
33 })
34 ];
35
36 propagatedBuildInputs = [
37 cmdliner
38 ppx_deriving
39 ppxlib
40 result
41 ];
42
43 doCheck = true;
44 checkInputs = [
45 alcotest
46 ];
47
48 passthru.updateScript = gitUpdater { rev-prefix = "v"; };
49
50 meta = with lib; {
51 description = "Ppx_deriving plugin for generating command line interfaces from types for OCaml";
52 homepage = "https://github.com/hammerlab/ppx_deriving_cmdliner";
53 license = licenses.asl20;
54 maintainers = [ maintainers.romildo ];
55 };
56}