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:
parent
fc3120ce90
commit
641cb61ef7
@ -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 = {
|
||||
|
@ -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 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user