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