summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/batteries/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/batteries/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/batteries/default.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix
index ce946c3d31fc..182d4296b6a9 100644
--- a/pkgs/development/ocaml-modules/batteries/default.nix
+++ b/pkgs/development/ocaml-modules/batteries/default.nix
@@ -2,7 +2,7 @@
 
 let
   ocaml_version = (builtins.parseDrvName ocaml.name).version;
-  version = "1.2.0";
+  version = "1.3.0";
 in
 
 stdenv.mkDerivation {
@@ -10,13 +10,26 @@ stdenv.mkDerivation {
 
   src = fetchurl {
     url = "http://forge.ocamlcore.org/frs/download.php/423/batteries-${version}.tar.gz";
-    sha256 = "0lkkbfj51zkhhr56nx167448pvg02nrzjjkl57ycic2ikzgq6lmx";
+    sha256 = "1kf8dyivigavi89lpsz7hzdv48as10yck7gkmqmnsnn1dps3m7an";
   };
 
   buildInputs = [ocaml findlib camomile ounit];
 
+  # This option is not correctly detected on Darwin
+  # It should be fixed in the svn
+  BATTERIES_NATIVE_SHLIB = if stdenv.isDarwin then "no" else "yes";
+
+  # Ditto
+  patchPhase = ''
+    substituteInPlace Makefile --replace 'echo -n' echo
+  '';
+
   configurePhase = "true"; 	# Skip configure
 
+  preInstall = ''
+    ensureDir "$out/lib/ocaml/${ocaml_version}/site-lib"
+  '';
+
   doCheck = true;
 
   checkTarget = "test";