Skip to content

Commit

Permalink
firefox: fallback to nss_3_53 when version is below 83
Browse files Browse the repository at this point in the history
  • Loading branch information
andir committed Nov 18, 2020
1 parent cbd0f89 commit c1cfe8b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkgs/applications/networking/browsers/firefox/common.nix
Expand Up @@ -4,7 +4,7 @@

{ lib, stdenv, pkgconfig, pango, perl, python2, python3, zip
, libjpeg, zlib, dbus, dbus-glib, bzip2, xorg
, freetype, fontconfig, file, nspr, nss, libnotify
, freetype, fontconfig, file, nspr, nss, nss_3_53, libnotify
, yasm, libGLU, libGL, sqlite, unzip, makeWrapper
, hunspell, libXdamage, libevent, libstartup_notification
, libvpx_1_8
Expand Down Expand Up @@ -106,6 +106,8 @@ let
# 78 ESR won't build with rustc 1.47
inherit (if lib.versionAtLeast ffversion "82" then rustPackages else rustPackages_1_45)
rustc cargo;

nss_pkg = if lib.versionOlder ffversion "83" then nss_3_53 else nss;
in

buildStdenv.mkDerivation ({
Expand Down Expand Up @@ -169,7 +171,7 @@ buildStdenv.mkDerivation ({
# yasm can potentially be removed in future versions
# https://bugzilla.mozilla.org/show_bug.cgi?id=1501796
# https://groups.google.com/forum/#!msg/mozilla.dev.platform/o-8levmLU80/SM_zQvfzCQAJ
nspr nss
nspr nss_pkg
]
++ lib.optional alsaSupport alsaLib
++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed
Expand All @@ -190,7 +192,7 @@ buildStdenv.mkDerivation ({

NIX_CFLAGS_COMPILE = toString [
"-I${glib.dev}/include/gio-unix-2.0"
"-I${nss.dev}/include/nss"
"-I${nss_pkg.dev}/include/nss"
];

MACH_USE_SYSTEM_PYTHON = "1";
Expand Down

0 comments on commit c1cfe8b

Please sign in to comment.