2023-11-22 15:33:16 -05:00
|
|
|
{
|
|
|
|
fetchurl,
|
|
|
|
lib,
|
2024-06-26 14:47:14 -04:00
|
|
|
pkgs,
|
2023-11-22 15:33:16 -05:00
|
|
|
stdenv,
|
2024-06-26 14:47:14 -04:00
|
|
|
...
|
2023-11-22 15:33:16 -05:00
|
|
|
} @ args: let
|
|
|
|
buildFirefoxXpiAddon = lib.makeOverridable ({
|
|
|
|
stdenv ? args.stdenv,
|
|
|
|
fetchurl ? args.fetchurl,
|
|
|
|
pname,
|
|
|
|
version,
|
|
|
|
addonId,
|
|
|
|
url,
|
|
|
|
sha256,
|
|
|
|
meta,
|
|
|
|
...
|
|
|
|
}:
|
2023-10-09 04:13:58 -04:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
|
|
|
inherit meta;
|
|
|
|
|
2023-11-22 15:33:16 -05:00
|
|
|
src = fetchurl {inherit url sha256;};
|
2023-10-09 04:13:58 -04:00
|
|
|
|
|
|
|
preferLocalBuild = true;
|
|
|
|
allowSubstitutes = true;
|
|
|
|
|
2024-01-08 11:25:18 -05:00
|
|
|
buildCommand =
|
2024-06-09 22:49:30 -04:00
|
|
|
# bash
|
2024-01-08 11:25:18 -05:00
|
|
|
''
|
|
|
|
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
|
|
|
mkdir -p "$dst"
|
|
|
|
install -v -m644 "$src" "$dst/${addonId}.xpi"
|
|
|
|
'';
|
2023-10-09 04:13:58 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
packages = import ./generated-firefox-addons.nix {
|
|
|
|
inherit buildFirefoxXpiAddon fetchurl lib stdenv;
|
|
|
|
};
|
2023-11-22 15:33:16 -05:00
|
|
|
in
|
2024-06-28 02:06:10 -04:00
|
|
|
lib.makeScope pkgs.newScope (
|
|
|
|
_:
|
|
|
|
packages
|
|
|
|
// {
|
|
|
|
inherit buildFirefoxXpiAddon;
|
2023-11-22 15:33:16 -05:00
|
|
|
|
2024-06-28 02:06:10 -04:00
|
|
|
seventv = buildFirefoxXpiAddon {
|
|
|
|
pname = "frankerfacez";
|
|
|
|
version = "4.0";
|
|
|
|
addonId = "frankerfacez@frankerfacez.com";
|
|
|
|
url = "https://cdn.frankerfacez.com/script/frankerfacez-4.0-an+fx.xpi";
|
|
|
|
sha256 = "sha256-U/yAra2c+RlGSaQtHfBz9XYsoDaJ67gmPJBsFrpqoE8=";
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.frankerfacez.com/";
|
|
|
|
description = "The Twitch Enhancement Suite. Get custom emotes and tons of new features you'll never want to go without.";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2024-06-26 14:47:14 -04:00
|
|
|
};
|
2024-06-28 02:06:10 -04:00
|
|
|
}
|
2024-06-26 14:47:14 -04:00
|
|
|
)
|