jsonnet: fix on darwin (#47939)

Build on darwin fails when using emscripten to build the js
library. Disabling this is unsatisfying, but gets the jsonnet binary
building again.
This commit is contained in:
pmahoney 2018-10-06 13:56:21 -05:00 committed by Benjamin Staffin
parent ec7d7e1f78
commit 4af5457ebb

View File

@ -1,4 +1,6 @@
{ stdenv, lib, fetchFromGitHub, emscripten }:
{ stdenv, lib, fetchFromGitHub, emscripten
, enableJsonnetJs ? !stdenv.isDarwin
}:
let version = "0.11.2"; in
@ -13,16 +15,17 @@ stdenv.mkDerivation {
sha256 = "05rl5i4g36k2ikxv4sw726mha1qf5bb66wiqpi0s09wj9azm7vym";
};
buildInputs = [ emscripten ];
buildInputs = if enableJsonnetJs then [ emscripten ] else [ ];
enableParallelBuilding = true;
makeFlags = [''EM_CACHE=$(TMPDIR)/.em_cache'' ''all''];
makeFlags = [''EM_CACHE=$(TMPDIR)/.em_cache''] ++
(if enableJsonnetJs then ["all"] else ["jsonnet" "libjsonnet.so" "libjsonnet++.so"]);
installPhase = ''
mkdir -p $out/bin $out/lib $out/share/
cp jsonnet $out/bin/
cp libjsonnet.so $out/lib/
cp libjsonnet*.so $out/lib/
cp -a doc $out/share/doc
cp -a include $out/include
'';