From f36a9a798e7b9a54bed2042ca77a75b3debf7645 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Tue, 7 Jul 2015 00:01:16 -0700 Subject: [PATCH] spidermonkey: Use more system dependencies and fix for perl 5.22 --- .../interpreters/spidermonkey/17.0.nix | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/spidermonkey/17.0.nix b/pkgs/development/interpreters/spidermonkey/17.0.nix index 41757244c004..7573b546164b 100644 --- a/pkgs/development/interpreters/spidermonkey/17.0.nix +++ b/pkgs/development/interpreters/spidermonkey/17.0.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, nspr, perl, python, zip }: +{ stdenv, fetchurl, pkgconfig, nspr, perl, python, zip, libffi, readline }: stdenv.mkDerivation rec { version = "17.0.0"; @@ -11,16 +11,26 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ nspr ]; - buildInputs = [ pkgconfig perl python zip ]; + buildInputs = [ pkgconfig perl python zip libffi readline ]; postUnpack = "sourceRoot=\${sourceRoot}/js/src"; + postPatch = '' + # Fixes an issue with version detection under perl 5.22.x + sed -i 's/(defined\((@TEMPLATE_FILE)\))/\1/' config/milestone.pl + ''; + preConfigure = '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr}/include/nspr" export LIBXUL_DIST=$out ''; - configureFlags = [ "--enable-threadsafe" "--with-system-nspr" ]; + configureFlags = [ + "--enable-threadsafe" + "--with-system-nspr" + "--with-system-ffi" + "--enable-readline" + ]; # hack around a make problem, see https://github.com/NixOS/nixpkgs/issues/1279#issuecomment-29547393 preBuild = "touch -- {.,shell,jsapi-tests}/{-lpthread,-ldl}";