summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorMatthew Maurer <matthew.r.maurer@gmail.com>2016-09-20 15:13:19 -0400
committerMatthew Maurer <matthew.r.maurer@gmail.com>2016-09-20 15:13:19 -0400
commit65fb52f21045134690bacf5d9c21086db20ab1d1 (patch)
tree485a93460f4b6ff0217125a49cfc35f2f83b50b2 /pkgs/development/ocaml-modules
parent1d0e6ba2df81ad5d9fa42c9181da945a8b1abae3 (diff)
downloadnixlib-65fb52f21045134690bacf5d9c21086db20ab1d1.tar
nixlib-65fb52f21045134690bacf5d9c21086db20ab1d1.tar.gz
nixlib-65fb52f21045134690bacf5d9c21086db20ab1d1.tar.bz2
nixlib-65fb52f21045134690bacf5d9c21086db20ab1d1.tar.lz
nixlib-65fb52f21045134690bacf5d9c21086db20ab1d1.tar.xz
nixlib-65fb52f21045134690bacf5d9c21086db20ab1d1.tar.zst
nixlib-65fb52f21045134690bacf5d9c21086db20ab1d1.zip
js-build-tools: Fix darwin build
On darwin, js-build-tools expects an OSX style userland and stat binary.
However, under nix we use the nix version of stat, which speaks linux-style
flags.

This patch removes js-build-tools special casing so that it speaks to stat
in linux style.
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/janestreet/js-build-tools-darwin.patch11
-rw-r--r--pkgs/development/ocaml-modules/janestreet/js-build-tools.nix2
2 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/janestreet/js-build-tools-darwin.patch b/pkgs/development/ocaml-modules/janestreet/js-build-tools-darwin.patch
new file mode 100644
index 000000000000..8878b4be68b8
--- /dev/null
+++ b/pkgs/development/ocaml-modules/janestreet/js-build-tools-darwin.patch
@@ -0,0 +1,11 @@
+--- a/ocamlbuild_goodies/jane_street_ocamlbuild_goodies.ml
++++ b/ocamlbuild_goodies/jane_street_ocamlbuild_goodies.ml
+@@ -65,7 +65,7 @@ let track_external_deps = function
+
+     let stat, md5sum =
+       match run_and_read "uname" |> String.trim with
+-      | "Darwin" ->
++      | "FreeBSD" | "NetBSD" ->
+         (S [A "stat"; A "-f"; A "%d:%i:%m"],
+          A "md5")
+       | _ ->
diff --git a/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix b/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix
index d6e67b277cac..bf697eda8007 100644
--- a/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix
+++ b/pkgs/development/ocaml-modules/janestreet/js-build-tools.nix
@@ -19,6 +19,8 @@ buildOcaml rec {
   configurePhase = "./configure --prefix $prefix";
   installPhase = "opam-installer -i --prefix $prefix --libdir `ocamlfind printconf destdir` ${name}.install";
 
+  patches = [ ./js-build-tools-darwin.patch ];
+
   meta = with stdenv.lib; {
     description = "Jane Street Build Tools";
     maintainers = [ maintainers.maurer ];