2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }:
|
2014-08-22 12:43:23 +00:00
|
|
|
|
2022-04-07 18:37:09 +00:00
|
|
|
assert (lib.versionAtLeast ocaml.version "4.03");
|
2019-01-09 15:04:18 +00:00
|
|
|
|
2016-10-05 07:32:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-04-07 18:37:09 +00:00
|
|
|
pname = "cmdliner";
|
|
|
|
version = "1.0.4";
|
2014-08-22 12:43:23 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-04-22 08:14:28 +00:00
|
|
|
url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
|
2022-04-07 18:37:09 +00:00
|
|
|
sha256 = "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw";
|
2014-08-22 12:43:23 +00:00
|
|
|
};
|
|
|
|
|
2022-04-07 18:37:09 +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}
|
|
|
|
'';
|
2014-08-22 12:43:23 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://erratique.ch/software/cmdliner";
|
2014-08-22 12:43:23 +00:00
|
|
|
description = "An OCaml module for the declarative definition of command line interfaces";
|
2022-04-25 17:35:21 +00:00
|
|
|
license = licenses.isc;
|
2022-05-10 17:36:58 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2017-05-28 20:38:23 +00:00
|
|
|
maintainers = [ maintainers.vbgl ];
|
2014-08-22 12:43:23 +00:00
|
|
|
};
|
|
|
|
}
|