firefox-extensions: tidy the wrapping and dont double-wrap
This commit is contained in:
@@ -29,7 +29,7 @@ let
|
|||||||
};
|
};
|
||||||
in (stdenv.mkDerivation ({
|
in (stdenv.mkDerivation ({
|
||||||
# heavily borrows from <repo:nixos/nixpkgs:pkgs/build-support/fetchfirefoxaddon/default.nix>
|
# heavily borrows from <repo:nixos/nixpkgs:pkgs/build-support/fetchfirefoxaddon/default.nix>
|
||||||
inherit (addon) name;
|
name = "${addon.name}-wrapped";
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
echo "patching firefox addon $name into $out/${extid}.xpi"
|
echo "patching firefox addon $name into $out/${extid}.xpi"
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ let
|
|||||||
'';
|
'';
|
||||||
} // args')).overrideAttrs (final: upstream: {
|
} // args')).overrideAttrs (final: upstream: {
|
||||||
passthru = (upstream.passthru or {}) // {
|
passthru = (upstream.passthru or {}) // {
|
||||||
withAttrs = attrs: wrapAddon final.finalPackage attrs;
|
withAttrs = attrs: wrapAddon addon (args // attrs);
|
||||||
withPostPatch = postPatch: final.passthru.withAttrs { inherit postPatch; };
|
withPostPatch = postPatch: final.passthru.withAttrs { inherit postPatch; };
|
||||||
# given an addon, repackage it without some `perm`ission
|
# given an addon, repackage it without some `perm`ission
|
||||||
withoutPermission = perm: final.passthru.withPostPatch ''
|
withoutPermission = perm: final.passthru.withPostPatch ''
|
||||||
|
Reference in New Issue
Block a user