diff options
Diffstat (limited to 'pkgs/applications/networking/browsers/firefox/common.nix')
-rw-r--r-- | pkgs/applications/networking/browsers/firefox/common.nix | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 5dc791631d8..2fc15a42a8b 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -2,13 +2,13 @@ , src, unpackPhase ? null, patches ? [] , extraNativeBuildInputs ? [], extraConfigureFlags ? [], extraMakeFlags ? [] }: -{ lib, stdenv, pkgconfig, pango, perl, python2, python3, zip, libIDL +{ lib, stdenv, pkgconfig, pango, perl, python2, python3, zip , libjpeg, zlib, dbus, dbus-glib, bzip2, xorg , freetype, fontconfig, file, nspr, nss, libnotify , yasm, libGLU, libGL, sqlite, unzip, makeWrapper , hunspell, libXdamage, libevent, libstartup_notification , libvpx, libvpx_1_8 -, icu, libpng, jemalloc, glib +, icu, icu67, libpng, jemalloc, glib , autoconf213, which, gnused, cargo, rustc, llvmPackages , rust-cbindgen, nodejs, nasm, fetchpatch , debugBuild ? false @@ -51,7 +51,7 @@ # https://github.com/NixOS/nixpkgs/issues/31843#issuecomment-346372756 we # have permission to use the official firefox branding. # -# Fur purposes of documentation the statement of @sylvestre: +# For purposes of documentation the statement of @sylvestre: # > As the person who did part of the work described in the LWN article # > and release manager working for Mozilla, I can confirm the statement # > that I made in @@ -104,14 +104,14 @@ stdenv.mkDerivation ({ patchFlags = [ "-p1" "-l" ]; buildInputs = [ - gtk2 perl zip libIDL libjpeg zlib bzip2 + gtk2 perl zip libjpeg zlib bzip2 dbus dbus-glib pango freetype fontconfig xorg.libXi xorg.libXcursor xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file libnotify xorg.pixman yasm libGLU libGL - xorg.libXScrnSaver xorg.xorgproto + xorg.xorgproto xorg.libXext unzip makeWrapper libevent libstartup_notification /* cairo */ - icu libpng jemalloc glib + libpng jemalloc glib nasm # >= 66 requires nasm for the AV1 lib dav1d # yasm can potentially be removed in future versions @@ -119,8 +119,10 @@ stdenv.mkDerivation ({ # https://groups.google.com/forum/#!msg/mozilla.dev.platform/o-8levmLU80/SM_zQvfzCQAJ nspr nss ] - ++ lib.optionals (lib.versionOlder ffversion "75") [ libvpx sqlite ] + ++ lib.optionals (lib.versionOlder ffversion "75") [ libvpx sqlite ] ++ lib.optional (lib.versionAtLeast ffversion "75.0") libvpx_1_8 + ++ lib.optional (lib.versionOlder ffversion "78") icu + ++ lib.optional (lib.versionAtLeast ffversion "78.0") icu67 ++ lib.optional alsaSupport alsaLib ++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed ++ lib.optional gtk3Support gtk3 @@ -138,7 +140,6 @@ stdenv.mkDerivation ({ "-Wno-error=format-security"); postPatch = '' - substituteInPlace third_party/prio/prio/rand.c --replace 'nspr/prinit.h' 'prinit.h' rm -rf obj-x86_64-pc-linux-gnu ''; @@ -176,9 +177,10 @@ stdenv.mkDerivation ({ # included we need to look in a few places. # TODO: generalize this process for other use-cases. - BINDGEN_CFLAGS="$(< ${stdenv.cc}/nix-support/libc-cflags) \ + BINDGEN_CFLAGS="$(< ${stdenv.cc}/nix-support/libc-crt1-cflags) \ + $(< ${stdenv.cc}/nix-support/libc-cflags) \ $(< ${stdenv.cc}/nix-support/cc-cflags) \ - ${stdenv.cc.default_cxx_stdlib_compile} \ + $(< ${stdenv.cc}/nix-support/libcxx-cxxflags) \ ${lib.optionalString stdenv.cc.isClang "-idirafter ${stdenv.cc.cc}/lib/clang/${lib.getVersion stdenv.cc.cc}/include"} \ ${lib.optionalString stdenv.cc.isGNU "-isystem ${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc} -isystem ${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/${stdenv.hostPlatform.config}"} \ $NIX_CFLAGS_COMPILE" @@ -201,7 +203,6 @@ stdenv.mkDerivation ({ "--enable-application=browser" "--with-system-jpeg" "--with-system-zlib" - "--with-system-bz2" "--with-system-libevent" "--with-system-libvpx" "--with-system-png" # needs APNG support @@ -209,19 +210,21 @@ stdenv.mkDerivation ({ "--enable-system-ffi" "--enable-system-pixman" #"--enable-system-cairo" - "--enable-startup-notification" - #"--enable-content-sandbox" # TODO: probably enable after 54 "--disable-tests" "--disable-necko-wifi" # maybe we want to enable this at some point "--disable-updater" "--enable-jemalloc" - "--disable-gconf" "--enable-default-toolkit=${default-toolkit}" "--with-libclang-path=${llvmPackages.libclang}/lib" "--with-clang-path=${llvmPackages.clang}/bin/clang" "--with-system-nspr" "--with-system-nss" ] + ++ lib.optionals (lib.versionOlder ffversion "78") [ + "--with-system-bz2" + "--enable-startup-notification" + "--disable-gconf" + ] ++ lib.optional (lib.versionOlder ffversion "75") "--enable-system-sqlite" ++ lib.optional (stdenv.isDarwin) "--disable-xcode-checks" ++ lib.optionals (lib.versionOlder ffversion "69") [ @@ -274,6 +277,7 @@ stdenv.mkDerivation ({ patchelf --set-rpath "${lib.getLib libnotify }/lib:$(patchelf --print-rpath "$out"/lib/${binaryName}*/libxul.so)" \ "$out"/lib/${binaryName}*/libxul.so + patchelf --add-needed ${xorg.libXScrnSaver.out}/lib/libXss.so $out/lib/${binaryName}/${binaryName} ''; doInstallCheck = true; |