Skip to content

Commit

Permalink
ocamlPackages.cmdliner: make version 1.0 the default
Browse files Browse the repository at this point in the history
  • Loading branch information
vbgl committed Sep 8, 2017
1 parent e93d92d commit ebd5c93
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
@@ -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/
'';
Expand Down
21 changes: 12 additions & 9 deletions 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/
'';
Expand Down
10 changes: 5 additions & 5 deletions pkgs/top-level/ocaml-packages.nix
Expand Up @@ -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 { };

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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; };

Expand Down

0 comments on commit ebd5c93

Please sign in to comment.