refactor(upScript): move ffz to mozilla-addons-to-nix
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
df50815aba
commit
6f8e392817
4 changed files with 29 additions and 28 deletions
|
@ -5,17 +5,17 @@ import { spawnSync } from 'node:child_process';
|
|||
/* Constants */
|
||||
const FLAKE = process.env.FLAKE;
|
||||
|
||||
const updateImages = (imagePath: string): string | undefined => {
|
||||
console.log(`Updating ${imagePath.split('/').at(-1)} images`);
|
||||
|
||||
const out = spawnSync('updateImages', [imagePath], { shell: true }).stdout.toString();
|
||||
|
||||
if (!out.startsWith('# Locked')) {
|
||||
return out;
|
||||
}
|
||||
};
|
||||
|
||||
export const updateDocker = () => {
|
||||
const updateImages = (imagePath: string): string | undefined => {
|
||||
console.log(`Updating ${imagePath.split('/').at(-1)} images`);
|
||||
|
||||
const out = spawnSync('updateImages', [imagePath], { shell: true }).stdout.toString();
|
||||
|
||||
if (!out.startsWith('# Locked')) {
|
||||
return out;
|
||||
}
|
||||
};
|
||||
|
||||
let updates = '';
|
||||
|
||||
updates += updateImages(`${FLAKE}/devices/nos/modules/jellyfin`) ?? '';
|
||||
|
|
|
@ -1,26 +1,11 @@
|
|||
import { spawnSync } from 'node:child_process';
|
||||
import { readFileSync } from 'node:fs';
|
||||
|
||||
import { parseFetchurl } from './lib.ts';
|
||||
|
||||
/* Constants */
|
||||
const FLAKE = process.env.FLAKE;
|
||||
|
||||
|
||||
const updateFFZ = () => {
|
||||
const FILE = `${FLAKE}/legacyPackages/firefox-addons/default.nix`;
|
||||
const URL = 'https://cdn.frankerfacez.com/script/frankerfacez-4.0-an+fx.xpi';
|
||||
|
||||
const HASH = parseFetchurl(URL);
|
||||
|
||||
spawnSync('sed', ['-i', `'s,url = .*,url = \"${URL}\";,'`, FILE], { shell: true });
|
||||
spawnSync('sed', ['-i', `'s,sha256 = .*,sha256 = \"${HASH}\";,'`, FILE], { shell: true });
|
||||
};
|
||||
|
||||
export const updateFirefoxAddons = () => {
|
||||
console.log('Updating FFZ addon');
|
||||
updateFFZ();
|
||||
|
||||
console.log('Updating firefox addons using mozilla-addons-to-nix');
|
||||
|
||||
const DIR = `${FLAKE}/legacyPackages/firefox-addons`;
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
{
|
||||
"slug": "floccus"
|
||||
},
|
||||
{
|
||||
"slug": "frankerfacez"
|
||||
},
|
||||
{
|
||||
"slug": "google-container"
|
||||
},
|
||||
|
|
|
@ -123,6 +123,19 @@
|
|||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"frankerfacez" = buildFirefoxXpiAddon {
|
||||
pname = "frankerfacez";
|
||||
version = "4.75.5.7";
|
||||
addonId = "frankerfacez@frankerfacez.com";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4377242/frankerfacez-4.75.5.7.xpi";
|
||||
sha256 = "e2edce704c662a7437edf5707777b72848fb857961587d4594d3d390a4bae9c1";
|
||||
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.";
|
||||
mozPermissions = ["*://*.twitch.tv/*"];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"google-container" = buildFirefoxXpiAddon {
|
||||
pname = "google-container";
|
||||
version = "1.5.4";
|
||||
|
@ -314,10 +327,10 @@
|
|||
};
|
||||
"ublock-origin" = buildFirefoxXpiAddon {
|
||||
pname = "ublock-origin";
|
||||
version = "1.60.0";
|
||||
version = "1.61.0";
|
||||
addonId = "uBlock0@raymondhill.net";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4359936/ublock_origin-1.60.0.xpi";
|
||||
sha256 = "e2cda9b2a1b0a7f6e5ef0da9f87f28df52f8560587ba2e51a3003121cfb81600";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4382536/ublock_origin-1.61.0.xpi";
|
||||
sha256 = "e6fd55b799a568c66c10892a8f22428e6773fe16d7466ce9dee2952f224b203d";
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/gorhill/uBlock#ublock-origin";
|
||||
description = "Finally, an efficient wide-spectrum content blocker. Easy on CPU and memory.";
|
||||
|
|
Loading…
Reference in a new issue