Files
nixpkgs/pkgs/by-name/rs/rsshub/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

83 lines
2.0 KiB
Nix

{
lib,
fetchFromGitHub,
makeBinaryWrapper,
nodejs,
pnpm_9,
replaceVars,
stdenv,
}:
let
pnpm = pnpm_9;
in
stdenv.mkDerivation (finalAttrs: {
pname = "rsshub";
version = "0-unstable-2025-05-31";
src = fetchFromGitHub {
owner = "DIYgod";
repo = "RSSHub";
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.fetchDeps {
inherit (finalAttrs) pname version src;
fetcherVersion = 1;
hash = "sha256-7qh6YZbIH/kHVssDZxHY7X8bytrnMcUq0MiJzWZYItc=";
};
nativeBuildInputs = [
makeBinaryWrapper
nodejs
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
'';
preFixup = ''
makeWrapper ${lib.getExe nodejs} $out/bin/rsshub \
--chdir "$out/lib/rsshub" \
--set "NODE_ENV" "production" \
--set "NO_LOGFILES" "true" \
--set "TSX_TSCONFIG_PATH" "$out/lib/rsshub/tsconfig.json" \
--append-flags "$out/lib/rsshub/node_modules/tsx/dist/cli.mjs" \
--append-flags "$out/lib/rsshub/lib/index.ts"
'';
meta = {
description = "RSS feed generator";
longDescription = ''
RSSHub is an open source, easy to use, and extensible RSS feed generator.
It's capable of generating RSS feeds from pretty much everything.
RSSHub delivers millions of contents aggregated from all kinds of sources,
our vibrant open source community is ensuring the deliver of RSSHub's new routes,
new features and bug fixes.
'';
homepage = "https://docs.rsshub.app";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ Guanran928 ];
mainProgram = "rsshub";
platforms = lib.platforms.all;
};
})