From b57b6e8398fb91da714bd79741726b9aece8fe92 Mon Sep 17 00:00:00 2001 From: phanirithvij Date: Sat, 31 May 2025 15:42:23 +0530 Subject: [PATCH 1/2] rsshub: 0-unstable-2025-02-03 -> 0-unstable-2025-05-31 Signed-off-by: phanirithvij --- .../rs/rsshub/0002-fix-network-call.patch | 18 ++++++++++++++++++ pkgs/by-name/rs/rsshub/package.nix | 9 +++++---- 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 pkgs/by-name/rs/rsshub/0002-fix-network-call.patch diff --git a/pkgs/by-name/rs/rsshub/0002-fix-network-call.patch b/pkgs/by-name/rs/rsshub/0002-fix-network-call.patch new file mode 100644 index 000000000000..61ac980109ef --- /dev/null +++ b/pkgs/by-name/rs/rsshub/0002-fix-network-call.patch @@ -0,0 +1,18 @@ +diff --git a/scripts/workflow/build-routes.ts b/scripts/workflow/build-routes.ts +index 9807cfc..b9dcfb9 100644 +--- a/scripts/workflow/build-routes.ts ++++ b/scripts/workflow/build-routes.ts +@@ -4,6 +4,7 @@ import { parse } from 'tldts'; + import fs from 'node:fs'; + import path from 'node:path'; + import toSource from 'tosource'; ++import { exit } from 'node:process'; + + import { getCurrentPath } from '../../lib/utils/helpers'; + const __dirname = getCurrentPath(import.meta.url); +@@ -73,3 +74,5 @@ fs.writeFileSync(path.join(__dirname, '../../assets/build/radar-rules.js'), `(${ + fs.writeFileSync(path.join(__dirname, '../../assets/build/maintainers.json'), JSON.stringify(maintainers, null, 2)); + fs.writeFileSync(path.join(__dirname, '../../assets/build/routes.json'), JSON.stringify(namespaces, null, 2)); + fs.writeFileSync(path.join(__dirname, '../../assets/build/routes.js'), `export default ${JSON.stringify(namespaces, null, 2)}`.replaceAll(/"module": "(.*)"\n/g, `"module": $1\n`)); ++ ++exit(0); diff --git a/pkgs/by-name/rs/rsshub/package.nix b/pkgs/by-name/rs/rsshub/package.nix index 3f5a3e557fde..82279ca1b697 100644 --- a/pkgs/by-name/rs/rsshub/package.nix +++ b/pkgs/by-name/rs/rsshub/package.nix @@ -9,24 +9,25 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "rsshub"; - version = "0-unstable-2025-02-03"; + version = "0-unstable-2025-05-31"; src = fetchFromGitHub { owner = "DIYgod"; repo = "RSSHub"; - rev = "72f78e2bfbcf000a6f374a92894430cf845fd1fd"; - hash = "sha256-okavLIYJZ+0iCsYtBc2r3FS18MVE/ap2OwRae7rWTrw="; + rev = "2dce2e32dd5f4dade2fc915ac8384c953e11cc83"; + hash = "sha256-gS/t6O3MishJgi2K9hV22hT95oYHfm44cJqrUo2GPlM="; }; patches = [ (replaceVars ./0001-fix-git-hash.patch { "GIT_HASH" = finalAttrs.src.rev; }) + ./0002-fix-network-call.patch ]; pnpmDeps = pnpm_9.fetchDeps { inherit (finalAttrs) pname version src; - hash = "sha256-c16Ue5YiRWlF7ldt/8WLi1/xYhGqqr6XqvUieQbvbWg="; + hash = "sha256-7qh6YZbIH/kHVssDZxHY7X8bytrnMcUq0MiJzWZYItc="; }; nativeBuildInputs = [ From 80a434df3193af314ba31c5ea592d122bdec6077 Mon Sep 17 00:00:00 2001 From: phanirithvij Date: Sat, 24 May 2025 11:15:42 +0530 Subject: [PATCH 2/2] rsshub: minor cleanup Signed-off-by: phanirithvij --- pkgs/by-name/rs/rsshub/package.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/rs/rsshub/package.nix b/pkgs/by-name/rs/rsshub/package.nix index 82279ca1b697..159dee479fd0 100644 --- a/pkgs/by-name/rs/rsshub/package.nix +++ b/pkgs/by-name/rs/rsshub/package.nix @@ -7,6 +7,9 @@ replaceVars, stdenv, }: +let + pnpm = pnpm_9; +in stdenv.mkDerivation (finalAttrs: { pname = "rsshub"; version = "0-unstable-2025-05-31"; @@ -25,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: { ./0002-fix-network-call.patch ]; - pnpmDeps = pnpm_9.fetchDeps { + pnpmDeps = pnpm.fetchDeps { inherit (finalAttrs) pname version src; hash = "sha256-7qh6YZbIH/kHVssDZxHY7X8bytrnMcUq0MiJzWZYItc="; }; @@ -33,23 +36,19 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ makeBinaryWrapper nodejs - pnpm_9.configHook + pnpm.configHook ]; buildPhase = '' runHook preBuild - pnpm build - runHook postBuild ''; installPhase = '' runHook preInstall - mkdir -p $out/bin $out/lib/rsshub cp -r lib node_modules assets api package.json tsconfig.json $out/lib/rsshub - runHook postInstall '';