Files
firefox-prefetch-addons/flake.nix

55 lines
1.5 KiB
Nix

{
description = "A simple bash script to fetch Firefox addons' IDs, to be used in ExtensionSettings policy.";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
outputs = {
nixpkgs,
self,
...
}: let
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = f:
nixpkgs.lib.genAttrs systems (system: let
pkgs = import nixpkgs {inherit system;};
in
f {
inherit pkgs;
inherit (pkgs) lib;
});
in {
overlays = {
firefox-prefetch-addons = final: prev: {
firefox-prefetch-addons = self.packages.${prev.system}.default;
};
default = self.overlays.firefox-prefetch-addons;
};
formatter = forAllSystems ({pkgs, ...}: pkgs.alejandra);
packages = forAllSystems ({
lib,
pkgs,
...
}: {
firefox-prefetch-addons = pkgs.writeShellApplication {
name = "firefox-prefetch-addons";
runtimeInputs = with pkgs; [alejandra jq nix unzip wget];
text = builtins.readFile ./firefox-prefetch-addons.sh;
excludeShellChecks = ["SC2181"];
meta = {
description = "A simple bash script to fetch Firefox addons' IDs, to be used in ExtensionSettings policy.";
homepage = "https://forge.capytal.company/dot013/firefox-prefetch-addons";
license = lib.licenses.wtfpl;
maintainers = with lib.maintainers; [guz013];
};
};
default = self.packages.${pkgs.system}.firefox-prefetch-addons;
});
};
}