From 69ad8a5d923917c89350f5f32c9000ec926d7c0d Mon Sep 17 00:00:00 2001 From: taku0 Date: Thu, 28 Sep 2017 09:13:15 +0900 Subject: [PATCH] firefox: 55.0.3 -> 56.0 --- .../networking/browsers/firefox/common.nix | 16 ++++++++++++++-- .../networking/browsers/firefox/packages.nix | 4 ++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index de19e6118511..1b72f9e18c30 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -8,8 +8,7 @@ , yasm, mesa, sqlite, unzip, makeWrapper , hunspell, libevent, libstartup_notification, libvpx , cairo, icu, libpng, jemalloc -, autoconf213, which, gnused, cargo, rustc - +, autoconf213, which, gnused, cargo, rustc, llvmPackages , debugBuild ? false ### optionals @@ -50,6 +49,7 @@ assert stdenv.cc ? libc && stdenv.cc.libc != null; let flag = tf: x: [(if tf then "--enable-${x}" else "--disable-${x}")]; + gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; in stdenv.mkDerivation (rec { @@ -74,6 +74,8 @@ stdenv.mkDerivation (rec { ++ lib.optionals ffmpegSupport [ gstreamer gst-plugins-base ] ++ lib.optional gtk3Support gtk3; + NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss"; + nativeBuildInputs = [ autoconf213 which gnused pkgconfig perl python cargo rustc ] ++ lib.optional gtk3Support wrapGAppsHook; @@ -88,6 +90,12 @@ stdenv.mkDerivation (rec { make -f client.mk configure-files configureScript="$(realpath ./configure)" + + cxxLib=$( echo -n ${gcc}/include/c++/* ) + archLib=$cxxLib/$( ${gcc}/bin/gcc -dumpmachine ) + + test -f layout/style/ServoBindings.toml && sed -i -e '/"-DMOZ_STYLO"/ a , "-cxx-isystem", "'$cxxLib'", "-isystem", "'$archLib'"' layout/style/ServoBindings.toml + cd obj-* '' + lib.optionalString googleAPISupport '' # Google API key used by Chromium and Firefox. @@ -120,6 +128,10 @@ stdenv.mkDerivation (rec { "--disable-gconf" "--enable-default-toolkit=cairo-gtk${if gtk3Support then "3" else "2"}" ] + ++ lib.optionals (stdenv.lib.versionAtLeast version "56") [ + "--with-libclang-path=${llvmPackages.clang-unwrapped}/lib" + "--with-clang-path=${llvmPackages.clang}/bin/clang" + ] # TorBrowser patches these ++ lib.optionals (!isTorBrowserLike) [ diff --git a/pkgs/applications/networking/browsers/firefox/packages.nix b/pkgs/applications/networking/browsers/firefox/packages.nix index e2a8e201fef7..5a3d9ee2b990 100644 --- a/pkgs/applications/networking/browsers/firefox/packages.nix +++ b/pkgs/applications/networking/browsers/firefox/packages.nix @@ -6,10 +6,10 @@ rec { firefox = common rec { pname = "firefox"; - version = "55.0.3"; + version = "56.0"; src = fetchurl { url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz"; - sha512 = "3cacc87b97871f3a8c5e97c17ef7025079cb5c81f32377d9402cdad45815ac6c4c4762c79187f1e477910161c2377c42d41de62a50b6741d5d7c1cd70e8c6416"; + sha512 = "3aeb0ff54e10c83894f61734daa4f0801a1bb499d4667adad9c78520e588eae809d0e4d61e9227206466d62c3b453e2ce9ca8198f59f5354cd1b6804c00f0990"; }; patches =