2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
assert (lib.versionAtLeast ocaml.version "4.03");
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-04-15 01:41:22 +00:00
|
|
|
pname = "cmdliner";
|
|
|
|
version = "1.0.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw";
|
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";
|
|
|
|
description = "An 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 ];
|
|
|
|
};
|
|
|
|
}
|