From b9307eddd67e0e3f087dec608ccc84fec72deda5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Tue, 18 Dec 2018 12:05:33 +0100 Subject: [PATCH] zeroad: fix build with spidermonkey-38.8.0 --- pkgs/games/0ad/game.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/games/0ad/game.nix b/pkgs/games/0ad/game.nix index d05f19d3171c..ab9ffd0470b6 100644 --- a/pkgs/games/0ad/game.nix +++ b/pkgs/games/0ad/game.nix @@ -33,11 +33,15 @@ stdenv.mkDerivation rec { "-I${SDL2}/include/SDL2" ]; - patches = [ ./rootdir_env.patch ]; - - postPatch = '' - sed -i 's/MOZJS_MINOR_VERSION/false \&\& MOZJS_MINOR_VERSION/' source/scriptinterface/ScriptTypes.h - ''; + patches = [ + ./rootdir_env.patch + # Fixes build with spidermonkey-38.8.0, includes the minor version check: + # https://src.fedoraproject.org/rpms/0ad/c/26dc1657f6e3c0ad9f1180ca38cd79b933ef0c8b + (fetchurl { + url = https://src.fedoraproject.org/rpms/0ad/raw/26dc1657f6e3c0ad9f1180ca38cd79b933ef0c8b/f/0ad-mozjs-incompatible.patch; + sha256 = "1rzpaalcrzihsgvlk3nqd87n2kxjldlwvb3qp5fcd5ffzr6k90wa"; + }) + ]; configurePhase = '' # Delete shipped libraries which we don't need.