firefox-extensions: repeat myself less when wrapping
This commit is contained in:
parent
558a9f4cd0
commit
2f71d80c38
|
@ -100,7 +100,7 @@ let
|
||||||
passthru.extid = extid;
|
passthru.extid = extid;
|
||||||
};
|
};
|
||||||
|
|
||||||
in lib.makeScope newScope (self: with self; {
|
in (lib.makeScope newScope (self: with self; {
|
||||||
unwrapped = lib.recurseIntoAttrs {
|
unwrapped = lib.recurseIntoAttrs {
|
||||||
# get names from:
|
# get names from:
|
||||||
# - ~/ref/nix-community/nur-combined/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
|
# - ~/ref/nix-community/nur-combined/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
|
||||||
|
@ -154,16 +154,12 @@ in lib.makeScope newScope (self: with self; {
|
||||||
hash = "sha256-6idJQXOguCPXgs1RP6mKUjZK3lzSAkjvpDPVcWUfacI=";
|
hash = "sha256-6idJQXOguCPXgs1RP6mKUjZK3lzSAkjvpDPVcWUfacI=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
})).overrideScope (self: super:
|
||||||
browserpass-extension = (wrapAddon unwrapped.browserpass-extension {})
|
let
|
||||||
.withoutPermission "notifications";
|
wrapped = lib.mapAttrs (name: _value: wrapAddon self.unwrapped."${name}" {}) super.unwrapped;
|
||||||
|
in wrapped // {
|
||||||
bypass-paywalls-clean = wrapAddon unwrapped.bypass-paywalls-clean {};
|
browserpass-extension = wrapped.browserpass-extension.withoutPermission "notifications";
|
||||||
ether-metamask = wrapAddon unwrapped.ether-metamask {};
|
sponsorblock = wrapped.sponsorblock.withPostPatch ''
|
||||||
i2p-in-private-browsing = wrapAddon unwrapped.i2p-in-private-browsing {};
|
|
||||||
sidebery = wrapAddon unwrapped.sidebery {};
|
|
||||||
sponsorblock = (wrapAddon unwrapped.sponsorblock {})
|
|
||||||
.withPostPatch ''
|
|
||||||
# patch sponsorblock to not show the help tab on first launch.
|
# patch sponsorblock to not show the help tab on first launch.
|
||||||
#
|
#
|
||||||
# XXX: i tried to build sponsorblock from source and patch this *before* it gets webpack'd,
|
# XXX: i tried to build sponsorblock from source and patch this *before* it gets webpack'd,
|
||||||
|
@ -174,7 +170,5 @@ in lib.makeScope newScope (self: with self; {
|
||||||
substituteInPlace js/background.js \
|
substituteInPlace js/background.js \
|
||||||
--replace 'default.config.userID)' 'default.config.userID && false)'
|
--replace 'default.config.userID)' 'default.config.userID && false)'
|
||||||
'';
|
'';
|
||||||
|
}
|
||||||
ublacklist = wrapAddon unwrapped.ublacklist {};
|
)
|
||||||
ublock-origin = wrapAddon unwrapped.ublock-origin {};
|
|
||||||
})
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user