git.iko.soy/typeable/nixpkgs
on master help sign in
spidermonkey: add 31.5
commit4bcde3f244c64170a293d75773429834bb3e701a authorAnders Papitto <anderspapitto@gmail.com> dateFri 28 Aug 2015, 14:27 (11 years ago) parentbd84eba
2 files changed+66
pkgs/development/interpreters/spidermonkey/31.5.nix+65 pkgs/top-level/all-packages.nix+1
pkgs/development/interpreters/spidermonkey/31.5.nixnew file+65
@@ -0,0 +1,65 @@
1+{ stdenv, fetchurl, pkgconfig, perl, python, zip, libffi, readline }:
2+
3+stdenv.mkDerivation rec {
4+ version = "31.5.0";
5+ name = "spidermonkey-${version}";
6+
7+ # the release notes point to some guys home directory, see
8+ # https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/31
9+ # probably it would be more ideal to pull a particular tag/revision
10+ # from the mercurial repo
11+ src = fetchurl {
12+ url = "https://people.mozilla.org/~sstangl/mozjs-31.5.0.tar.bz2";
13+ sha256 = "1q8icql5hh1g3gzg5fp4rl9rfagyhm9gilfn3dgi7qn4i1mrfqsd";
14+ };
15+
16+ buildInputs = [ pkgconfig perl python zip libffi readline ];
17+
18+ postUnpack = "sourceRoot=\${sourceRoot}/js/src";
19+
20+ preConfigure = ''
21+ export LIBXUL_DIST=$out
22+ '';
23+
24+ configureFlags = [
25+ "--enable-threadsafe"
26+ "--with-system-ffi"
27+ "--enable-readline"
28+
29+ # there is at least one unfixed issue building the tests, so I didn't bother
30+ "--disable-tests"
31+
32+ # enabling these because they're wanted by 0ad. They may or may
33+ # not be good defaults for other uses.
34+ "--enable-gcgenerational"
35+ "--enable-shared-js"
36+
37+ # Due to a build-system bug, this means the exact opposite of what it says.
38+ # It is required by gcgenerational.
39+ "--disable-exact-rooting"
40+ ];
41+
42+ # This addresses some build system bug. It's quite likely to be safe
43+ # to re-enable parallel builds if the source revision changes.
44+ enableParallelBuilding = false;
45+
46+ # see comment by --disable-tests
47+ doCheck = false;
48+
49+ postFixup = ''
50+ # The headers are symlinks to a directory that doesn't get put
51+ # into $out, so they end up broken. Fix that by just resolving the
52+ # symlinks.
53+ for i in $(find $out -type l); do
54+ cp --remove-destination "$(readlink "$i")" "$i";
55+ done
56+ '';
57+
58+ meta = with stdenv.lib; {
59+ description = "Mozilla's JavaScript engine written in C/C++";
60+ homepage = https://developer.mozilla.org/en/SpiderMonkey;
61+ # TODO: MPL/GPL/LGPL tri-license.
62+
63+ maintainers = [ maintainers.goibhniu ];
64+ };
65+}
pkgs/top-level/all-packages.nix+1
@@ -5238,6 +5238,7 @@ let
52385238 spidermonkey_185 = callPackage ../development/interpreters/spidermonkey/185-1.0.0.nix { };
52395239 spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.0.nix { };
52405240 spidermonkey_24 = callPackage ../development/interpreters/spidermonkey/24.2.nix { };
5241+ spidermonkey_31 = callPackage ../development/interpreters/spidermonkey/31.5.nix { };
52415242
52425243 supercollider = callPackage ../development/interpreters/supercollider {
52435244 gcc = gcc48; # doesn't build with gcc49