Skip to content

Commit

Permalink
Merge #114560: firefox: 85.0.1 -> 86.0 + dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Feb 28, 2021
2 parents 70646d6 + 61061e1 commit df8e3bd
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 39 deletions.
11 changes: 6 additions & 5 deletions pkgs/applications/networking/browsers/firefox/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
, libvpx_1_8
, icu67, libpng, jemalloc, glib
, autoconf213, which, gnused, cargo, rustc, llvmPackages
, rust-cbindgen, rust-cbindgen_0_15, nodejs, nasm, fetchpatch
, rust-cbindgen, nodejs, nasm, fetchpatch
, gnum4
, debugBuild ? false

Expand All @@ -19,7 +19,7 @@
## backported libraries

, nss_latest

, rust-cbindgen_latest

## optional libraries

Expand Down Expand Up @@ -93,8 +93,8 @@ let
then "/Applications/${binaryNameCapitalized}.app/Contents/MacOS"
else "/bin";

nss_pkg = if lib.versionAtLeast ffversion "82" then nss_latest else nss_3_53;
rust-cbindgen_pkg = if lib.versionAtLeast ffversion "83" then rust-cbindgen_0_15 else rust-cbindgen;
nss_pkg = if lib.versionAtLeast ffversion "86" then nss_latest else nss_3_53;
rust-cbindgen_pkg = if lib.versionAtLeast ffversion "86" then rust-cbindgen_latest else rust-cbindgen;
in

stdenv.mkDerivation ({
Expand All @@ -104,8 +104,9 @@ stdenv.mkDerivation ({
inherit src unpackPhase meta;

patches = [
./env_var_for_system_dir.patch
] ++
lib.optional (lib.versionOlder ffversion "86") ./env_var_for_system_dir-ff85.patch ++
lib.optional (lib.versionAtLeast ffversion "86") ./env_var_for_system_dir-ff86.patch ++
lib.optional (lib.versionOlder ffversion "83") ./no-buildconfig-ffx76.patch ++
lib.optional (lib.versionAtLeast ffversion "84") ./no-buildconfig-ffx84.patch ++

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff -r 22fc47c968f2 toolkit/xre/nsXREDirProvider.cpp
--- a/toolkit/xre/nsXREDirProvider.cpp Mon Dec 14 15:09:17 2020 +0000
+++ b/toolkit/xre/nsXREDirProvider.cpp Tue Feb 23 23:38:56 2021 +0100
@@ -11,6 +11,7 @@

#include "jsapi.h"
#include "xpcpublic.h"
+#include "prenv.h"

#include "nsIAppStartup.h"
#include "nsIFile.h"
@@ -305,7 +306,8 @@
"/usr/lib/mozilla"_ns
# endif
;
- rv = NS_NewNativeLocalFile(dirname, false, getter_AddRefs(localDir));
+ const char* pathVar = PR_GetEnv("MOZ_SYSTEM_DIR");
+ rv = NS_NewNativeLocalFile((pathVar && *pathVar) ? nsDependentCString(pathVar) : reinterpret_cast<const nsCString&>(dirname), false, getter_AddRefs(localDir));
# endif

if (NS_SUCCEEDED(rv)) {
4 changes: 2 additions & 2 deletions pkgs/applications/networking/browsers/firefox/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ in
rec {
firefox = commonCP rec {
pname = "firefox";
ffversion = "85.0.1";
ffversion = "86.0";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${ffversion}/source/firefox-${ffversion}.source.tar.xz";
sha512 = "0i0x1jvwrjvbdz90dgmf7lw3qj56y37nf5h3qs55263d0jgvnkqfc5dgjfzrq51z5a546lmbs4p97qiaf2p3d5wiv3lx8cw43n74axd";
sha512 = "f5a7b9aa53e2955e972e30cc62ae64ae955127eab951d7a1102d5ac8a73804982e01b917787c00a6e0a0ed03594567d29a24808271283ef61a9383bc4bb39e3f";
};

meta = {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/libraries/nss/latest.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let
url = "http://dev.gentoo.org/~polynomial-c/mozilla/nss-3.15.4-pem-support-20140109.patch.xz";
sha256 = "10ibz6y0hknac15zr6dw4gv9nb5r5z9ym6gq18j3xqx7v7n3vpdw";
};
version = "3.60";
version = "3.61";
underscoreVersion = builtins.replaceStrings ["."] ["_"] version;

in stdenv.mkDerivation rec {
Expand All @@ -14,7 +14,7 @@ in stdenv.mkDerivation rec {

src = fetchurl {
url = "mirror://mozilla/security/nss/releases/NSS_${underscoreVersion}_RTM/src/${pname}-${version}.tar.gz";
sha256 = "0ggyj3ax3kal65sl1vl4nfhx2s08blg4dg8iwlxcax5qb9bxbaw4";
sha256 = "0w0k1v6pn2mv1vim7pv0xn63z1dcss6cymqbqzzg1k1l9f02sbii";
};

depsBuildBuild = [ buildPackages.stdenv.cc ];
Expand Down
29 changes: 0 additions & 29 deletions pkgs/development/tools/rust/cbindgen/0_15.nix

This file was deleted.

38 changes: 38 additions & 0 deletions pkgs/development/tools/rust/cbindgen/0_17.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, python3Packages, Security }:

rustPlatform.buildRustPackage rec {
pname = "rust-cbindgen";
version = "0.17.0";

src = fetchFromGitHub {
owner = "eqrion";
repo = "cbindgen";
rev = "v${version}";
sha256 = "1w9gf6fl1ncm2zlh0p29lislfsd35zd1mhns2mrxl2n734zavaqf";
};

cargoSha256 = "12jw1m842gzy0ma4drgmwk1jac663vysllfpl9cglr039j1sfsx2";

buildInputs = lib.optional stdenv.isDarwin Security;

checkInputs = [
python3Packages.cython
];

checkFlags = [
# Disable tests that require rust unstable features
# https://github.com/eqrion/cbindgen/issues/338
"--skip test_expand"
"--skip test_bitfield"
"--skip lib_default_uses_debug_build"
"--skip lib_explicit_debug_build"
"--skip lib_explicit_release_build"
];

meta = with lib; {
description = "A project for generating C bindings from Rust code";
homepage = "https://github.com/eqrion/cbindgen";
license = licenses.mpl20;
maintainers = with maintainers; [ jtojnar ];
};
}
3 changes: 2 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9693,10 +9693,11 @@ in
rust-cbindgen = callPackage ../development/tools/rust/cbindgen {
inherit (darwin.apple_sdk.frameworks) Security;
};
rust-cbindgen_0_15 = callPackage ../development/tools/rust/cbindgen/0_15.nix {
rust-cbindgen_latest = callPackage ../development/tools/rust/cbindgen/0_17.nix {
inherit (darwin.apple_sdk.frameworks) Security;
};


rustup = callPackage ../development/tools/rust/rustup {
inherit (darwin.apple_sdk.frameworks) CoreServices Security;
};
Expand Down

0 comments on commit df8e3bd

Please sign in to comment.