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