diff --git a/pkgs/development/interpreters/spidermonkey/17.nix b/pkgs/development/interpreters/spidermonkey/17.nix index da5fc193a222..9c47ebe79b6e 100644 --- a/pkgs/development/interpreters/spidermonkey/17.nix +++ b/pkgs/development/interpreters/spidermonkey/17.nix @@ -18,6 +18,16 @@ stdenv.mkDerivation rec { postUnpack = "sourceRoot=\${sourceRoot}/js/src"; + patches = [ + (fetchurl { + name = "jsoptparse-gcc7.patch"; + url = "https://src.fedoraproject.org/cgit/rpms/mozjs17.git/plain/" + + "mozjs17.0.0-gcc7.patch?id=43b846629a299f"; + sha256 = "17plyaq0jwf9wli4zlgvh4ri3zyk6nj1fiakh3wnd37nsl90raf9"; + }) + ]; + patchFlags = "-p3"; + postPatch = '' # Fixes an issue with version detection under perl 5.22.x sed -i 's/(defined\((@TEMPLATE_FILE)\))/\1/' config/milestone.pl