From ebd5c936fd6760c61022f6c342003c9dc0d5bac2 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 8 Sep 2017 04:09:11 +0000 Subject: ocamlPackages.cmdliner: make version 1.0 the default --- pkgs/development/ocaml-modules/cmdliner/0.9.nix | 39 ++++++++++++++++++++ pkgs/development/ocaml-modules/cmdliner/1.0.nix | 42 ---------------------- .../development/ocaml-modules/cmdliner/default.nix | 21 ++++++----- pkgs/top-level/ocaml-packages.nix | 10 +++--- 4 files changed, 56 insertions(+), 56 deletions(-) create mode 100644 pkgs/development/ocaml-modules/cmdliner/0.9.nix delete mode 100644 pkgs/development/ocaml-modules/cmdliner/1.0.nix diff --git a/pkgs/development/ocaml-modules/cmdliner/0.9.nix b/pkgs/development/ocaml-modules/cmdliner/0.9.nix new file mode 100644 index 000000000000..e8824f318071 --- /dev/null +++ b/pkgs/development/ocaml-modules/cmdliner/0.9.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam }: + +let + pname = "cmdliner"; +in + +assert stdenv.lib.versionAtLeast ocaml.version "3.12"; + +stdenv.mkDerivation rec { + + name = "ocaml-${pname}-${version}"; + version = "0.9.8"; + + src = fetchurl { + url = "http://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; + sha256 = "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx"; + }; + + unpackCmd = "tar xjf $src"; + nativeBuildInputs = [ ocamlbuild opam ]; + buildInputs = [ ocaml findlib ]; + + createFindlibDestdir = true; + + configurePhase = "ocaml pkg/git.ml"; + buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"; + installPhase = '' + opam-installer --script --prefix=$out | sh + ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml.version}/site-lib/ + ''; + + meta = with stdenv.lib; { + homepage = http://erratique.ch/software/cmdliner; + description = "An OCaml module for the declarative definition of command line interfaces"; + license = licenses.bsd3; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.vbgl ]; + }; +} diff --git a/pkgs/development/ocaml-modules/cmdliner/1.0.nix b/pkgs/development/ocaml-modules/cmdliner/1.0.nix deleted file mode 100644 index 2e2abe897e0f..000000000000 --- a/pkgs/development/ocaml-modules/cmdliner/1.0.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, result }: - -let - pname = "cmdliner"; -in - -assert stdenv.lib.versionAtLeast ocaml.version "4.01.0"; - -stdenv.mkDerivation rec { - name = "ocaml-${pname}-${version}"; - version = "1.0.2"; - - src = fetchurl { - url = "http://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; - sha256 = "18jqphjiifljlh9jg8zpl6310p3iwyaqphdkmf89acyaix0s4kj1"; - }; - - unpackCmd = "tar xjf $src"; - - nativeBuildInputs = [ ocamlbuild opam topkg ]; - buildInputs = [ ocaml findlib ]; - propagatedBuildInputs = [ result ]; - - createFindlibDestdir = true; - - buildPhase = '' - ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib pkg/pkg.ml build - ''; - - installPhase = '' - opam-installer --script --prefix=$out | sh - ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml.version}/site-lib/ - ''; - - meta = with stdenv.lib; { - homepage = http://erratique.ch/software/cmdliner; - description = "An OCaml module for the declarative definition of command line interfaces"; - license = licenses.bsd3; - platforms = ocaml.meta.platforms or []; - maintainers = [ maintainers.vbgl ]; - }; -} diff --git a/pkgs/development/ocaml-modules/cmdliner/default.nix b/pkgs/development/ocaml-modules/cmdliner/default.nix index e8824f318071..2e2abe897e0f 100644 --- a/pkgs/development/ocaml-modules/cmdliner/default.nix +++ b/pkgs/development/ocaml-modules/cmdliner/default.nix @@ -1,30 +1,33 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam }: +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, result }: let pname = "cmdliner"; in -assert stdenv.lib.versionAtLeast ocaml.version "3.12"; +assert stdenv.lib.versionAtLeast ocaml.version "4.01.0"; stdenv.mkDerivation rec { - name = "ocaml-${pname}-${version}"; - version = "0.9.8"; + version = "1.0.2"; src = fetchurl { url = "http://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; - sha256 = "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx"; + sha256 = "18jqphjiifljlh9jg8zpl6310p3iwyaqphdkmf89acyaix0s4kj1"; }; unpackCmd = "tar xjf $src"; - nativeBuildInputs = [ ocamlbuild opam ]; + + nativeBuildInputs = [ ocamlbuild opam topkg ]; buildInputs = [ ocaml findlib ]; + propagatedBuildInputs = [ result ]; createFindlibDestdir = true; - configurePhase = "ocaml pkg/git.ml"; - buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"; - installPhase = '' + buildPhase = '' + ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib pkg/pkg.ml build + ''; + + installPhase = '' opam-installer --script --prefix=$out | sh ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml.version}/site-lib/ ''; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 27c24a8adf95..cccb378068d8 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -54,7 +54,7 @@ let base64 = callPackage ../development/ocaml-modules/base64 { }; - bap = callPackage ../development/ocaml-modules/bap { }; + bap = callPackage ../development/ocaml-modules/bap { cmdliner = cmdliner_0_9; }; bitstring = callPackage ../development/ocaml-modules/bitstring { }; @@ -124,9 +124,9 @@ let cil = callPackage ../development/ocaml-modules/cil { }; - cmdliner = callPackage ../development/ocaml-modules/cmdliner { }; + cmdliner_0_9 = callPackage ../development/ocaml-modules/cmdliner/0.9.nix { }; - cmdliner_1_0 = callPackage ../development/ocaml-modules/cmdliner/1.0.nix { }; + cmdliner = callPackage ../development/ocaml-modules/cmdliner { }; cohttp_p4 = callPackage ../development/ocaml-modules/cohttp/0.19.3.nix { lwt = lwt2; @@ -447,8 +447,8 @@ let ocpBuild = callPackage ../development/tools/ocaml/ocp-build { }; - ocpIndent = callPackage ../development/tools/ocaml/ocp-indent { cmdliner = cmdliner_1_0; }; - ocpIndent_1_5_2 = callPackage ../development/tools/ocaml/ocp-indent/1.5.2.nix { }; + ocpIndent = callPackage ../development/tools/ocaml/ocp-indent { }; + ocpIndent_1_5_2 = callPackage ../development/tools/ocaml/ocp-indent/1.5.2.nix { cmdliner = cmdliner_0_9; }; ocp-index = callPackage ../development/tools/ocaml/ocp-index { ocpIndent = ocpIndent_1_5_2; }; -- cgit 1.4.1