diff options
author | aszlig <aszlig@nix.build> | 2023-12-06 16:28:35 +0100 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2023-12-06 17:19:25 +0100 |
commit | 351fc8133d07829b20e7c48bcff50f6f06cd3693 (patch) | |
tree | 1d610bab094c32bd59d4830f44c0a8f40d3fc0ce /pkgs/aszlig/firefox/default.nix | |
parent | 3394b41b9738541e4b70f600fd2ca295bc191a21 (diff) |
firefox: Fix evaluation with newer nixpkgs
A recent nixpkgs change[1] added an explicit requireSigning attribute, which in turn sets MOZ_REQUIRE_SIGNING to a zero-width string. The change also changed the check in the Firefox wrapper to check whether the browser derivation exposes a requireSigning attribute, which it doesn't. Since I'm busy with other things and just want my machine configuration to evaluate, I quickly worked around this by re-adding the requireSigning (and allowAddonSideload for that matter) to the derivation attributes on our side. [1]: https://github.com/NixOS/nixpkgs/commit/c4c81ac8a219e8725dae514f49c Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/aszlig/firefox/default.nix')
-rw-r--r-- | pkgs/aszlig/firefox/default.nix | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/pkgs/aszlig/firefox/default.nix b/pkgs/aszlig/firefox/default.nix index 12fb7786..b1c68a05 100644 --- a/pkgs/aszlig/firefox/default.nix +++ b/pkgs/aszlig/firefox/default.nix @@ -1,5 +1,5 @@ { lib, writeTextFile, writers, wrapFirefox, fetchFirefoxAddon -, firefox-unwrapped, tridactyl-native +, firefoxPackages, buildMozillaMach, tridactyl-native }: let @@ -9,7 +9,14 @@ let extensions = lib.mapAttrs mkExtension (lib.importJSON ./addons.json); - firefoxNoSigning = (firefox-unwrapped.override { + firefoxNoSigning = ((firefoxPackages.override { + # XXX: The buildMozillaMach gets passed its options via a non-overridable + # attribute set, so we need to wrap it here. + buildMozillaMach = opts: buildMozillaMach (opts // { + requireSigning = false; + allowAddonSideload = true; + }); + }).firefox.override { crashreporterSupport = false; drmSupport = false; googleAPISupport = false; @@ -18,15 +25,19 @@ let ./mute-by-default.patch ./dont-block-about-pages.patch ]; - MOZ_REQUIRE_SIGNING = false; - }); + }) // { + # XXX: This is needed because the requireSigning and allowAddonSideload are + # not passed through with the new buildMozillaMach function. + requireSigning = false; + allowAddonSideload = true; + }; jsString = str: builtins.toJSON (toString str); in wrapFirefox firefoxNoSigning { nixExtensions = lib.attrValues extensions; - extraNativeMessagingHosts = [ + nativeMessagingHosts = [ (writeTextFile { name = "ff2mpv-native"; destination = "/lib/mozilla/native-messaging-hosts/ff2mpv.json"; |