diff --git a/pkgs/development/interpreters/spidermonkey/17.nix b/pkgs/development/interpreters/spidermonkey/17.nix index 9c47ebe79b6e..e2eef0fab695 100644 --- a/pkgs/development/interpreters/spidermonkey/17.nix +++ b/pkgs/development/interpreters/spidermonkey/17.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, pkgconfig, nspr, perl, python2, zip, libffi, readline }: +{ stdenv, fetchurl, pkgconfig, nspr, perl, python2, zip, libffi +, enableReadline ? (!stdenv.isDarwin), readline +, libobjc }: stdenv.mkDerivation rec { version = "17.0.0"; @@ -14,7 +16,9 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ nspr ]; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ perl python2 zip libffi readline ]; + buildInputs = [ perl python2 zip libffi readline ] + ++ stdenv.lib.optional enableReadline readline + ++ stdenv.lib.optional stdenv.isDarwin libobjc; postUnpack = "sourceRoot=\${sourceRoot}/js/src"; @@ -48,7 +52,7 @@ stdenv.mkDerivation rec { "--enable-threadsafe" "--with-system-nspr" "--with-system-ffi" - "--enable-readline" + (if enableReadline then "--enable-readline" else "--disable-readline") ]; # hack around a make problem, see https://github.com/NixOS/nixpkgs/issues/1279#issuecomment-29547393 @@ -64,6 +68,7 @@ stdenv.mkDerivation rec { # https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130617/1041155.html echo -e '#!${stdenv.shell}\nexit 0' > config/find_vanilla_new_calls + '' + stdenv.lib.optionalString stdenv.isLinux '' paxmark m shell/js17 paxmark mr jsapi-tests/jsapi-tests ''; @@ -78,7 +83,6 @@ stdenv.mkDerivation rec { homepage = https://developer.mozilla.org/en/SpiderMonkey; # TODO: MPL/GPL/LGPL tri-license. maintainers = [ maintainers.goibhniu ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 45e62452181e..e941860fdd3e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7518,7 +7518,10 @@ with pkgs; spark_22 = callPackage ../applications/networking/cluster/spark { version = "2.2.1"; }; spidermonkey_1_8_5 = callPackage ../development/interpreters/spidermonkey/1.8.5.nix { }; - spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.nix { }; + spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.nix { + inherit (darwin) libobjc; + stdenv = gccStdenv; + }; spidermonkey_31 = callPackage ../development/interpreters/spidermonkey/31.nix { }; spidermonkey_38 = callPackage ../development/interpreters/spidermonkey/38.nix ({ inherit (darwin) libobjc;