From 26798bd6e07cb56b31faa6d7ab8ce814e6d040cf Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 14 Nov 2017 17:43:21 +0000 Subject: [PATCH] ocamlPackages.batteries: 2.7.0 -> 2.8.0 Also renames the attribute from ocaml_batteries to batteries. --- pkgs/development/compilers/fstar/default.nix | 2 +- .../development/ocaml-modules/batteries/default.nix | 13 ++++++++----- pkgs/development/ocaml-modules/sqlexpr/default.nix | 4 ++-- pkgs/top-level/ocaml-packages.nix | 5 ++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/pkgs/development/compilers/fstar/default.nix b/pkgs/development/compilers/fstar/default.nix index 3aef4e3ba89d..6df09b402f7c 100644 --- a/pkgs/development/compilers/fstar/default.nix +++ b/pkgs/development/compilers/fstar/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = with ocamlPackages; [ - z3 ocaml findlib ocaml_batteries menhir stdint + z3 ocaml findlib batteries menhir stdint zarith camlp4 yojson pprint ]; diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix index 7c8dc08c4888..e71496e84f04 100644 --- a/pkgs/development/ocaml-modules/batteries/default.nix +++ b/pkgs/development/ocaml-modules/batteries/default.nix @@ -1,18 +1,21 @@ -{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, qtest }: +{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, qtest, num }: -let version = "2.7.0"; in +let version = "2.8.0"; in stdenv.mkDerivation { - name = "ocaml-batteries-${version}"; + name = "ocaml${ocaml.version}-batteries-${version}"; src = fetchzip { url = "https://github.com/ocaml-batteries-team/batteries-included/archive/v${version}.tar.gz"; - sha256 = "02rgfylz6x4y2030cclf9zwk2i8xqsydn1y9hjkja2qsk895bwfb"; + sha256 = "1cvgljg8lxvfx0v3367z3p43dysg9m33v8gfy43bhw7fjr1bmyas"; }; buildInputs = [ ocaml findlib ocamlbuild qtest ]; + propagatedBuildInputs = [ num ]; - configurePhase = "true"; # Skip configure + configurePhase = if num != null then '' + export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH}''${CAML_LD_LIBRARY_PATH:+:}${num}/lib/ocaml/${ocaml.version}/site-lib/stublibs/" + '' else "true"; # Skip configure doCheck = true; checkTarget = "test test"; diff --git a/pkgs/development/ocaml-modules/sqlexpr/default.nix b/pkgs/development/ocaml-modules/sqlexpr/default.nix index 6d1654f2b42f..363d5850ec60 100644 --- a/pkgs/development/ocaml-modules/sqlexpr/default.nix +++ b/pkgs/development/ocaml-modules/sqlexpr/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildOcaml, fetchurl, ocaml_batteries, csv, ocaml_lwt, ocaml_sqlite3, estring }: +{ stdenv, buildOcaml, fetchurl, batteries, csv, ocaml_lwt, ocaml_sqlite3, estring }: buildOcaml rec { name = "sqlexpr"; @@ -9,7 +9,7 @@ buildOcaml rec { sha256 = "02pi0xxr3xzalwpvcaq96k57wz2vxj20l2mga1a4d2ddvhran8kr"; }; - propagatedBuildInputs = [ ocaml_batteries csv ocaml_lwt ocaml_sqlite3 estring ]; + propagatedBuildInputs = [ batteries csv ocaml_lwt ocaml_sqlite3 estring ]; meta = with stdenv.lib; { homepage = https://github.com/mfp/ocaml-sqlexpr; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 47abcbe1de36..36c2669d29cb 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -56,6 +56,8 @@ let bap = callPackage ../development/ocaml-modules/bap { cmdliner = cmdliner_0_9; }; + batteries = callPackage ../development/ocaml-modules/batteries { }; + bitstring = callPackage ../development/ocaml-modules/bitstring { }; bolt = callPackage ../development/ocaml-modules/bolt { }; @@ -286,7 +288,6 @@ let inifiles = callPackage ../development/ocaml-modules/inifiles { }; jingoo = callPackage ../development/ocaml-modules/jingoo { - batteries = ocaml_batteries; pcre = ocaml_pcre; }; @@ -391,8 +392,6 @@ let then callPackage ../development/ocaml-modules/num {} else null; - ocaml_batteries = callPackage ../development/ocaml-modules/batteries { }; - comparelib = callPackage ../development/ocaml-modules/comparelib { }; core_extended_p4 = callPackage ../development/ocaml-modules/core_extended { };