nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 ocaml,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "cmdliner";
10 version = "1.0.4";
11
12 src = fetchurl {
13 url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
14 sha256 = "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw";
15 };
16
17 nativeBuildInputs = [ ocaml ];
18
19 makeFlags = [ "PREFIX=$(out)" ];
20 installTargets = "install install-doc";
21 installFlags = [
22 "LIBDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/${pname}"
23 "DOCDIR=$(out)/share/doc/${pname}"
24 ];
25 postInstall = ''
26 mv $out/lib/ocaml/${ocaml.version}/site-lib/${pname}/{opam,${pname}.opam}
27 '';
28
29 meta = {
30 homepage = "https://erratique.ch/software/cmdliner";
31 description = "OCaml module for the declarative definition of command line interfaces";
32 license = lib.licenses.isc;
33 inherit (ocaml.meta) platforms;
34 maintainers = [ lib.maintainers.vbgl ];
35 broken = !(lib.versionAtLeast ocaml.version "4.03");
36 };
37}