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,8 +5,7 @@ import { spawnSync } from 'node:child_process';
|
||||||
/* Constants */
|
/* Constants */
|
||||||
const FLAKE = process.env.FLAKE;
|
const FLAKE = process.env.FLAKE;
|
||||||
|
|
||||||
export const updateDocker = () => {
|
const updateImages = (imagePath: string): string | undefined => {
|
||||||
const updateImages = (imagePath: string): string | undefined => {
|
|
||||||
console.log(`Updating ${imagePath.split('/').at(-1)} images`);
|
console.log(`Updating ${imagePath.split('/').at(-1)} images`);
|
||||||
|
|
||||||
const out = spawnSync('updateImages', [imagePath], { shell: true }).stdout.toString();
|
const out = spawnSync('updateImages', [imagePath], { shell: true }).stdout.toString();
|
||||||
|
@ -14,8 +13,9 @@ export const updateDocker = () => {
|
||||||
if (!out.startsWith('# Locked')) {
|
if (!out.startsWith('# Locked')) {
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const updateDocker = () => {
|
||||||
let updates = '';
|
let updates = '';
|
||||||
|
|
||||||
updates += updateImages(`${FLAKE}/devices/nos/modules/jellyfin`) ?? '';
|
updates += updateImages(`${FLAKE}/devices/nos/modules/jellyfin`) ?? '';
|
||||||
|
|
|
@ -1,26 +1,11 @@
|
||||||
import { spawnSync } from 'node:child_process';
|
import { spawnSync } from 'node:child_process';
|
||||||
import { readFileSync } from 'node:fs';
|
import { readFileSync } from 'node:fs';
|
||||||
|
|
||||||
import { parseFetchurl } from './lib.ts';
|
|
||||||
|
|
||||||
/* Constants */
|
/* Constants */
|
||||||
const FLAKE = process.env.FLAKE;
|
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 = () => {
|
export const updateFirefoxAddons = () => {
|
||||||
console.log('Updating FFZ addon');
|
|
||||||
updateFFZ();
|
|
||||||
|
|
||||||
console.log('Updating firefox addons using mozilla-addons-to-nix');
|
console.log('Updating firefox addons using mozilla-addons-to-nix');
|
||||||
|
|
||||||
const DIR = `${FLAKE}/legacyPackages/firefox-addons`;
|
const DIR = `${FLAKE}/legacyPackages/firefox-addons`;
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
{
|
{
|
||||||
"slug": "floccus"
|
"slug": "floccus"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"slug": "frankerfacez"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"slug": "google-container"
|
"slug": "google-container"
|
||||||
},
|
},
|
||||||
|
|
|
@ -123,6 +123,19 @@
|
||||||
platforms = platforms.all;
|
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 {
|
"google-container" = buildFirefoxXpiAddon {
|
||||||
pname = "google-container";
|
pname = "google-container";
|
||||||
version = "1.5.4";
|
version = "1.5.4";
|
||||||
|
@ -314,10 +327,10 @@
|
||||||
};
|
};
|
||||||
"ublock-origin" = buildFirefoxXpiAddon {
|
"ublock-origin" = buildFirefoxXpiAddon {
|
||||||
pname = "ublock-origin";
|
pname = "ublock-origin";
|
||||||
version = "1.60.0";
|
version = "1.61.0";
|
||||||
addonId = "uBlock0@raymondhill.net";
|
addonId = "uBlock0@raymondhill.net";
|
||||||
url = "https://addons.mozilla.org/firefox/downloads/file/4359936/ublock_origin-1.60.0.xpi";
|
url = "https://addons.mozilla.org/firefox/downloads/file/4382536/ublock_origin-1.61.0.xpi";
|
||||||
sha256 = "e2cda9b2a1b0a7f6e5ef0da9f87f28df52f8560587ba2e51a3003121cfb81600";
|
sha256 = "e6fd55b799a568c66c10892a8f22428e6773fe16d7466ce9dee2952f224b203d";
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/gorhill/uBlock#ublock-origin";
|
homepage = "https://github.com/gorhill/uBlock#ublock-origin";
|
||||||
description = "Finally, an efficient wide-spectrum content blocker. Easy on CPU and memory.";
|
description = "Finally, an efficient wide-spectrum content blocker. Easy on CPU and memory.";
|
||||||
|
|
Loading…
Reference in a new issue