summaryrefslogtreecommitdiff
path: root/update-addons.nix
blob: 994245ae68afca30d3d8a894af6cb6b597bdd46e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  pkgs ? import <nixpkgs> {
    inherit system;
    config = { };
    overlays = [ ];
  },
  system ? builtins.currentSystem,
}:

let
  inherit (pkgs) lib;

  getchpkgs = import ./default.nix { inherit pkgs; };
in

pkgs.writeShellApplication {
  name = "update-firefox-addons";

  text = lib.concatLines (
    lib.mapAttrsToList (
      pname: drv:
      lib.escapeShellArgs (
        getchpkgs.firefoxAddonUpdateScript {
          attrPath = "firefox-addons.${pname}";
          inherit (drv.passthru) addonRef;
        }
      )
    ) getchpkgs.firefox-addons
  );
}