git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #9502 from anderspapitto/0ad

add spidermonkey 31.5, and upgrade 0ad to version 18 Alpha

commit488c5ac43380dc4cb465602612fac343c5a6913c authorArseniy Seroka <jagajaga@users.noreply.github.com> dateWed 9 Sep 2015, 03:11 (11 years ago) parent90a7bb63455919
4 files changed+76−6
pkgs/development/interpreters/spidermonkey/31.5.nix+65 pkgs/games/0ad/data.nix+1−1 pkgs/games/0ad/default.nix+9−5 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/games/0ad/data.nix+1−1
@@ -5,7 +5,7 @@ stdenv.mkDerivation rec {
55
66 src = fetchurl {
77 url = "http://releases.wildfiregames.com/0ad-${version}-${releaseType}-unix-data.tar.xz";
8− sha256 = "6bf2234ef5043b14a3bbeda013fefed73ce2e564262f5e03b0801bfe671331d0";
8+ sha256 = "0i5cf4n9qhzbi6hvw5lxapind24qpqfq6p5lrhx8gb25p670g95i";
99 };
1010
1111 patchPhase = ''
pkgs/games/0ad/default.nix+9−5
@@ -1,5 +1,5 @@
11{ stdenv, callPackage, fetchurl, python27
2−, pkgconfig, spidermonkey_24, boost, icu, libxml2, libpng
2+, pkgconfig, spidermonkey_31, boost, icu, libxml2, libpng
33, libjpeg, zlib, curl, libogg, libvorbis, enet, miniupnpc
44, openal, mesa, xproto, libX11, libXcursor, nspr, SDL
55, gloox, nvidia-texture-tools
@@ -9,7 +9,7 @@
99assert withEditor -> wxGTK != null;
1010
1111let
12− version = "0.0.17";
12+ version = "0.0.18";
1313
1414 releaseType = "alpha";
1515
@@ -25,11 +25,11 @@ stdenv.mkDerivation rec {
2525
2626 src = fetchurl {
2727 url = "http://releases.wildfiregames.com/0ad-${version}-${releaseType}-unix-build.tar.xz";
28− sha256 = "ef144d44fe8a8abd29a4642999a58a596b8f0d0e1f310065f5ce1dfbe29c3aeb";
28+ sha256 = "15q3mv5k3lqzf0wrby2r93fs194ym13790i68q8azscs4v9h8bxx";
2929 };
3030
3131 buildInputs = [
32− zeroadData python27 pkgconfig spidermonkey_24 boost icu
32+ zeroadData python27 pkgconfig spidermonkey_31 boost icu
3333 libxml2 libpng libjpeg zlib curl libogg libvorbis enet
3434 miniupnpc openal mesa xproto libX11 libXcursor nspr
3535 SDL gloox nvidia-texture-tools
@@ -41,6 +41,10 @@ stdenv.mkDerivation rec {
4141 "-I${libXcursor}/include/X11"
4242 ];
4343
44+ patchPhase = ''
45+ sed -i 's/MOZJS_MINOR_VERSION/false \&\& MOZJS_MINOR_VERSION/' source/scriptinterface/ScriptTypes.h
46+ '';
47+
4448 configurePhase = ''
4549 # Delete shipped libraries which we don't need.
4650 rm -rf libraries/source/{enet,miniupnpc,nvtt,spidermonkey}
@@ -58,7 +62,7 @@ stdenv.mkDerivation rec {
5862 --with-system-nvtt \
5963 --with-system-enet \
6064 --with-system-miniupnpc \
61− --with-system-mozjs24 \
65+ --with-system-mozjs31 \
6266 ${ if withEditor then "--atlas" else "" } \
6367 --collada \
6468 --bindir="$out"/bin \
pkgs/top-level/all-packages.nix+1
@@ -5225,6 +5225,7 @@ let
52255225 spidermonkey_185 = callPackage ../development/interpreters/spidermonkey/185-1.0.0.nix { };
52265226 spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.0.nix { };
52275227 spidermonkey_24 = callPackage ../development/interpreters/spidermonkey/24.2.nix { };
5228+ spidermonkey_31 = callPackage ../development/interpreters/spidermonkey/31.5.nix { };
52285229
52295230 supercollider = callPackage ../development/interpreters/supercollider {
52305231 gcc = gcc48; # doesn't build with gcc49