ocamlPackages.cmdliner: make version 1.0 the default

This commit is contained in:
Vincent Laporte 2017-09-08 04:09:11 +00:00
parent e93d92d391
commit ebd5c936fd
3 changed files with 26 additions and 26 deletions

View File

@ -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/
'';

View File

@ -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/
'';

View File

@ -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; };