Skip to content

Commit

Permalink
spidermonkey_52: Split into multiple outputs (and nuke static lib)
Browse files Browse the repository at this point in the history
Saves 28M.
  • Loading branch information
dezgeg committed Oct 27, 2018
1 parent ad7f2d1 commit e310622
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkgs/development/interpreters/spidermonkey/52.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ in stdenv.mkDerivation rec {
sha256 = "1mlx34fgh1kaqamrkl5isf0npch3mm6s4lz3jsjb7hakiijhj7f0";
};

outputs = [ "out" "dev" ];
setOutputFlags = false; # Configure script only understands --includedir

buildInputs = [ readline icu zlib nspr ];
nativeBuildInputs = [ autoconf213 pkgconfig perl which python2 zip ];

Expand All @@ -32,6 +35,7 @@ in stdenv.mkDerivation rec {
export CXXFLAGS="-fpermissive"
export LIBXUL_DIST=$out
export PYTHON="${python2.interpreter}"
configureFlagsArray+=("--includedir=$dev/include")
cd js/src
Expand All @@ -49,6 +53,12 @@ in stdenv.mkDerivation rec {

enableParallelBuilding = true;

postInstall = ''
moveToOutput bin/js52-config "$dev"
# Nuke a static lib.
rm $out/lib/libjs_static.ajs
'';

meta = with stdenv.lib; {
description = "Mozilla's JavaScript engine written in C/C++";
homepage = https://developer.mozilla.org/en/SpiderMonkey;
Expand Down

0 comments on commit e310622

Please sign in to comment.