depot/pkgs/development/ocaml-modules/cmdliner/1_0.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

33 lines
959 B
Nix

{ lib, stdenv, fetchurl, ocaml }:
assert (lib.versionAtLeast ocaml.version "4.03");
stdenv.mkDerivation rec {
pname = "cmdliner";
version = "1.0.4";
src = fetchurl {
url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
sha256 = "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw";
};
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}
'';
meta = with lib; {
homepage = "https://erratique.ch/software/cmdliner";
description = "OCaml module for the declarative definition of command line interfaces";
license = licenses.isc;
inherit (ocaml.meta) platforms;
maintainers = [ maintainers.vbgl ];
};
}