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
|
{ stdenv, lib, fetchFromGitHub }:
|
||||||
, enableJsonnetJs ? !stdenv.isDarwin
|
|
||||||
}:
|
|
||||||
|
|
||||||
let version = "0.11.2"; in
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "jsonnet-${version}";
|
name = "jsonnet-${version}";
|
||||||
version = version;
|
version = "0.11.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
|
@ -15,19 +11,18 @@ stdenv.mkDerivation {
|
||||||
sha256 = "05rl5i4g36k2ikxv4sw726mha1qf5bb66wiqpi0s09wj9azm7vym";
|
sha256 = "05rl5i4g36k2ikxv4sw726mha1qf5bb66wiqpi0s09wj9azm7vym";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = if enableJsonnetJs then [ emscripten ] else [ ];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
makeFlags = [''EM_CACHE=$(TMPDIR)/.em_cache''] ++
|
makeFlags = [
|
||||||
(if enableJsonnetJs then ["all"] else ["jsonnet" "libjsonnet.so" "libjsonnet++.so"]);
|
"jsonnet"
|
||||||
|
"libjsonnet.so"
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $out/lib $out/share/
|
mkdir -p $out/bin $out/lib $out/include
|
||||||
cp jsonnet $out/bin/
|
cp jsonnet $out/bin/
|
||||||
cp libjsonnet*.so $out/lib/
|
cp libjsonnet*.so $out/lib/
|
||||||
cp -a doc $out/share/doc
|
cp -a include/*.h $out/include/
|
||||||
cp -a include $out/include
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -10110,9 +10110,7 @@ with pkgs;
|
||||||
|
|
||||||
jsoncpp = callPackage ../development/libraries/jsoncpp { };
|
jsoncpp = callPackage ../development/libraries/jsoncpp { };
|
||||||
|
|
||||||
jsonnet = callPackage ../development/compilers/jsonnet {
|
jsonnet = callPackage ../development/compilers/jsonnet { };
|
||||||
emscripten = emscripten.override {python=python2;};
|
|
||||||
};
|
|
||||||
|
|
||||||
jsonrpc-glib = callPackage ../development/libraries/jsonrpc-glib { };
|
jsonrpc-glib = callPackage ../development/libraries/jsonrpc-glib { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue