diff options
author | Milan Pässler <milan@petabyte.dev> | 2021-05-01 18:47:29 +0200 |
---|---|---|
committer | Milan Pässler <milan@petabyte.dev> | 2021-05-01 18:47:29 +0200 |
commit | d05202ea7c026640c18c9d058aa24a0469e7930d (patch) | |
tree | 569f51da192e84010f2d6daac0232e337d6188f8 /pkgs/applications/networking/browsers | |
parent | 4b2c9640e7a6371374042133ba4cfbc7242d9355 (diff) |
Revert "firefox-esr: use latest Rust"
This reverts commit 903e23ad362ed19e95eaf7765af719db551dfbbe. It caused segfaults when playing media: https://github.com/NixOS/nixpkgs/issues/121408
Diffstat (limited to 'pkgs/applications/networking/browsers')
-rw-r--r-- | pkgs/applications/networking/browsers/firefox/common.nix | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 0b79da754f8df..24195e578bd0d 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -9,7 +9,7 @@ , hunspell, libevent, libstartup_notification , libvpx_1_8 , icu67, libpng, jemalloc, glib, pciutils -, autoconf213, which, gnused, rustPackages +, autoconf213, which, gnused, rustPackages, rustPackages_1_45 , rust-cbindgen, nodejs, nasm, fetchpatch , gnum4 , debugBuild ? false @@ -90,13 +90,19 @@ let then "/Applications/${binaryNameCapitalized}.app/Contents/MacOS" else "/bin"; - inherit (rustPackages) rustc cargo; + # 78 ESR won't build with rustc 1.47 + inherit (if lib.versionAtLeast ffversion "82" then rustPackages else rustPackages_1_45) + rustc cargo; # Darwin's stdenv provides the default llvmPackages version, match that since # clang LTO on Darwin is broken so the stdenv is not being changed. + # Target the LLVM version that rustc -Vv reports it is built with for LTO. + # rustPackages_1_45 -> LLVM 10, rustPackages -> LLVM 11 llvmPackages = if stdenv.isDarwin then buildPackages.llvmPackages - else buildPackages.llvmPackages_11; + else if lib.versionAtLeast rustc.llvm.version "11" + then buildPackages.llvmPackages_11 + else buildPackages.llvmPackages_10; # When LTO for Darwin is fixed, the following will need updating as lld # doesn't work on it. For now it is fine since ltoSupport implies no Darwin. |