jsonnet: skip building the website (#47981)

The emscripten build of jsonnet is only used in the interactive demo
found on jsonnet.org, and I don't think we need to include the whole
website in our package.  This reduces the transitive closure from
~100mb to ~32mb, and the build duration from ~8 minutes to ~20 seconds
on my machine.
This commit is contained in:
Benjamin Staffin 2018-10-07 20:04:59 -04:00 committed by GitHub
parent fc3120ce90
commit 641cb61ef7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 17 deletions

View File

@ -1,12 +1,8 @@
{ stdenv, lib, fetchFromGitHub, emscripten
, enableJsonnetJs ? !stdenv.isDarwin
}:
{ stdenv, lib, fetchFromGitHub }:
let version = "0.11.2"; in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
name = "jsonnet-${version}";
version = version;
version = "0.11.2";
src = fetchFromGitHub {
rev = "v${version}";
@ -15,19 +11,18 @@ stdenv.mkDerivation {
sha256 = "05rl5i4g36k2ikxv4sw726mha1qf5bb66wiqpi0s09wj9azm7vym";
};
buildInputs = if enableJsonnetJs then [ emscripten ] else [ ];
enableParallelBuilding = true;
makeFlags = [''EM_CACHE=$(TMPDIR)/.em_cache''] ++
(if enableJsonnetJs then ["all"] else ["jsonnet" "libjsonnet.so" "libjsonnet++.so"]);
makeFlags = [
"jsonnet"
"libjsonnet.so"
];
installPhase = ''
mkdir -p $out/bin $out/lib $out/share/
mkdir -p $out/bin $out/lib $out/include
cp jsonnet $out/bin/
cp libjsonnet*.so $out/lib/
cp -a doc $out/share/doc
cp -a include $out/include
cp -a include/*.h $out/include/
'';
meta = {

View File

@ -10110,9 +10110,7 @@ with pkgs;
jsoncpp = callPackage ../development/libraries/jsoncpp { };
jsonnet = callPackage ../development/compilers/jsonnet {
emscripten = emscripten.override {python=python2;};
};
jsonnet = callPackage ../development/compilers/jsonnet { };
jsonrpc-glib = callPackage ../development/libraries/jsonrpc-glib { };