2021-02-02 11:29:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildDunePackage
|
|
|
|
, fetchFromGitHub
|
2022-10-23 15:23:25 +01:00
|
|
|
, fetchpatch
|
2021-02-02 11:29:15 +00:00
|
|
|
, alcotest
|
|
|
|
, cmdliner
|
|
|
|
, ppx_deriving
|
|
|
|
, ppxlib
|
2022-10-23 12:10:36 +01:00
|
|
|
, gitUpdater
|
2021-02-02 11:29:15 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "ppx_deriving_cmdliner";
|
2022-10-23 13:59:15 +01:00
|
|
|
version = "0.6.1";
|
2021-02-02 11:29:15 +00:00
|
|
|
|
2022-11-09 19:41:22 +00:00
|
|
|
minimalOCamlVersion = "4.11";
|
2021-02-02 11:29:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hammerlab";
|
2022-10-23 13:59:15 +01:00
|
|
|
repo = pname;
|
2021-02-02 11:29:15 +00:00
|
|
|
rev = "v${version}";
|
2022-10-23 13:59:15 +01:00
|
|
|
sha256 = "sha256-/22KLQnxu3e2ZSca6ZLxTJDfv/rsmgCUkJnZC0RwRi8";
|
2021-02-02 11:29:15 +00:00
|
|
|
};
|
|
|
|
|
2022-10-23 15:23:25 +01:00
|
|
|
patches = [
|
|
|
|
# Ppxlib.0.26.0 compatibility
|
|
|
|
# remove when a new version is released
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://patch-diff.githubusercontent.com/raw/hammerlab/ppx_deriving_cmdliner/pull/50.patch";
|
|
|
|
sha256 = "sha256-FfUfEAsyobwZ99+s5sFAaCE6Xgx7jLr/q79OxDbGcvQ=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-02 11:29:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cmdliner
|
|
|
|
ppx_deriving
|
|
|
|
ppxlib
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkInputs = [
|
|
|
|
alcotest
|
|
|
|
];
|
|
|
|
|
2022-10-23 12:10:36 +01:00
|
|
|
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
|
|
|
|
|
2021-02-02 11:29:15 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Ppx_deriving plugin for generating command line interfaces from types for OCaml";
|
2022-10-23 13:59:15 +01:00
|
|
|
homepage = "https://github.com/hammerlab/ppx_deriving_cmdliner";
|
2021-02-02 11:29:15 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|