nixpkgs/pkgs/development/ocaml-modules/cmdliner/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

2017-12-14 08:36:29 +01:00
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }:
let
pname = "cmdliner";
in
assert stdenv.lib.versionAtLeast ocaml.version "4.01.0";
let param =
if stdenv.lib.versionAtLeast ocaml.version "4.03" then {
version = "1.0.3";
sha256 = "0g3w4hvc1cx9x2yp5aqn6m2rl8lf9x1dn754hfq8m1sc1102lxna";
} else {
version = "1.0.2";
sha256 = "18jqphjiifljlh9jg8zpl6310p3iwyaqphdkmf89acyaix0s4kj1";
}
; in
2016-10-05 09:32:30 +02:00
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-${pname}-${version}";
inherit (param) version;
src = fetchurl {
url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
inherit (param) sha256;
};
2017-12-14 08:36:29 +01:00
nativeBuildInputs = [ ocamlbuild topkg ];
2017-05-28 22:38:23 +02:00
buildInputs = [ ocaml findlib ];
propagatedBuildInputs = [ result ];
2017-12-14 08:36:29 +01:00
inherit (topkg) buildPhase installPhase;
meta = with stdenv.lib; {
homepage = https://erratique.ch/software/cmdliner;
description = "An OCaml module for the declarative definition of command line interfaces";
license = licenses.bsd3;
platforms = ocaml.meta.platforms or [];
2017-05-28 22:38:23 +02:00
maintainers = [ maintainers.vbgl ];
};
}