From ebd5c936fd6760c61022f6c342003c9dc0d5bac2 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 8 Sep 2017 04:09:11 +0000 Subject: [PATCH] ocamlPackages.cmdliner: make version 1.0 the default --- .../cmdliner/{1.0.nix => 0.9.nix} | 21 ++++++++----------- .../ocaml-modules/cmdliner/default.nix | 21 +++++++++++-------- pkgs/top-level/ocaml-packages.nix | 10 ++++----- 3 files changed, 26 insertions(+), 26 deletions(-) rename pkgs/development/ocaml-modules/cmdliner/{1.0.nix => 0.9.nix} (62%) diff --git a/pkgs/development/ocaml-modules/cmdliner/1.0.nix b/pkgs/development/ocaml-modules/cmdliner/0.9.nix similarity index 62% rename from pkgs/development/ocaml-modules/cmdliner/1.0.nix rename to pkgs/development/ocaml-modules/cmdliner/0.9.nix index 2e2abe897e0f..e8824f318071 100644 --- a/pkgs/development/ocaml-modules/cmdliner/1.0.nix +++ b/pkgs/development/ocaml-modules/cmdliner/0.9.nix @@ -1,33 +1,30 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, result }: +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam }: let pname = "cmdliner"; in -assert stdenv.lib.versionAtLeast ocaml.version "4.01.0"; +assert stdenv.lib.versionAtLeast ocaml.version "3.12"; stdenv.mkDerivation rec { + name = "ocaml-${pname}-${version}"; - version = "1.0.2"; + version = "0.9.8"; src = fetchurl { url = "http://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz"; - sha256 = "18jqphjiifljlh9jg8zpl6310p3iwyaqphdkmf89acyaix0s4kj1"; + sha256 = "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx"; }; unpackCmd = "tar xjf $src"; - - nativeBuildInputs = [ ocamlbuild opam topkg ]; + nativeBuildInputs = [ ocamlbuild opam ]; buildInputs = [ ocaml findlib ]; - propagatedBuildInputs = [ result ]; createFindlibDestdir = true; - buildPhase = '' - ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib pkg/pkg.ml build - ''; - - installPhase = '' + 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/ ''; 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; };