diff options
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/cmdliner/1_1.nix')
-rw-r--r-- | nixpkgs/pkgs/development/ocaml-modules/cmdliner/1_1.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/cmdliner/1_1.nix b/nixpkgs/pkgs/development/ocaml-modules/cmdliner/1_1.nix new file mode 100644 index 000000000000..67d55bc756a9 --- /dev/null +++ b/nixpkgs/pkgs/development/ocaml-modules/cmdliner/1_1.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }: + +lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08") + "cmdliner 1.1 is not available for OCaml ${ocaml.version}" + +stdenv.mkDerivation rec { + pname = "cmdliner"; + version = "1.3.0"; + + src = fetchurl { + url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; + sha256 = "sha256-joGA9XO0QPanqMII2rLK5KgjhP7HMtInhNG7bmQWjLs="; + }; + + 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 ]; + }; +} |