2024-07-27 06:49:29 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
|
|
|
|
"cmdliner 1.1 is not available for OCaml ${ocaml.version}"
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-04-15 01:41:22 +00:00
|
|
|
pname = "cmdliner";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
|
2024-06-05 15:53:02 +00:00
|
|
|
sha256 = "sha256-joGA9XO0QPanqMII2rLK5KgjhP7HMtInhNG7bmQWjLs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
nativeBuildInputs = [ ocaml ];
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
installTargets = "install install-doc";
|
|
|
|
installFlags = [
|
|
|
|
"LIBDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/${pname}"
|
|
|
|
"DOCDIR=$(out)/share/doc/${pname}"
|
|
|
|
];
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/lib/ocaml/${ocaml.version}/site-lib/${pname}/{opam,${pname}.opam}
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://erratique.ch/software/cmdliner";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "OCaml module for the declarative definition of command line interfaces";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.isc;
|
2022-05-18 14:49:53 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.vbgl ];
|
|
|
|
};
|
|
|
|
}
|