spidermonkey: Use more system dependencies and fix for perl 5.22

+13 -3
+13 -3
pkgs/development/interpreters/spidermonkey/17.0.nix
··· 1 - { stdenv, fetchurl, pkgconfig, nspr, perl, python, zip }: 1 + { stdenv, fetchurl, pkgconfig, nspr, perl, python, zip, libffi, readline }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 version = "17.0.0"; ··· 11 11 12 12 propagatedBuildInputs = [ nspr ]; 13 13 14 - buildInputs = [ pkgconfig perl python zip ]; 14 + buildInputs = [ pkgconfig perl python zip libffi readline ]; 15 15 16 16 postUnpack = "sourceRoot=\${sourceRoot}/js/src"; 17 17 18 + postPatch = '' 19 + # Fixes an issue with version detection under perl 5.22.x 20 + sed -i 's/(defined\((@TEMPLATE_FILE)\))/\1/' config/milestone.pl 21 + ''; 22 + 18 23 preConfigure = '' 19 24 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr}/include/nspr" 20 25 export LIBXUL_DIST=$out 21 26 ''; 22 27 23 - configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ]; 28 + configureFlags = [ 29 + "--enable-threadsafe" 30 + "--with-system-nspr" 31 + "--with-system-ffi" 32 + "--enable-readline" 33 + ]; 24 34 25 35 # hack around a make problem, see https://github.com/NixOS/nixpkgs/issues/1279#issuecomment-29547393 26 36 preBuild = "touch -- {.,shell,jsapi-tests}/{-lpthread,-ldl}";