nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 82 lines 2.1 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 makeBinaryWrapper, 5 nodejs, 6 pnpm_9, 7 replaceVars, 8 stdenv, 9}: 10let 11 pnpm = pnpm_9; 12in 13stdenv.mkDerivation (finalAttrs: { 14 pname = "rsshub"; 15 version = "0-unstable-2025-05-31"; 16 17 src = fetchFromGitHub { 18 owner = "DIYgod"; 19 repo = "RSSHub"; 20 rev = "2dce2e32dd5f4dade2fc915ac8384c953e11cc83"; 21 hash = "sha256-gS/t6O3MishJgi2K9hV22hT95oYHfm44cJqrUo2GPlM="; 22 }; 23 24 patches = [ 25 (replaceVars ./0001-fix-git-hash.patch { 26 "GIT_HASH" = finalAttrs.src.rev; 27 }) 28 ./0002-fix-network-call.patch 29 ]; 30 31 pnpmDeps = pnpm.fetchDeps { 32 inherit (finalAttrs) pname version src; 33 fetcherVersion = 1; 34 hash = "sha256-7qh6YZbIH/kHVssDZxHY7X8bytrnMcUq0MiJzWZYItc="; 35 }; 36 37 nativeBuildInputs = [ 38 makeBinaryWrapper 39 nodejs 40 pnpm.configHook 41 ]; 42 43 buildPhase = '' 44 runHook preBuild 45 pnpm build 46 runHook postBuild 47 ''; 48 49 installPhase = '' 50 runHook preInstall 51 mkdir -p $out/bin $out/lib/rsshub 52 cp -r lib node_modules assets api package.json tsconfig.json $out/lib/rsshub 53 runHook postInstall 54 ''; 55 56 preFixup = '' 57 makeWrapper ${lib.getExe nodejs} $out/bin/rsshub \ 58 --chdir "$out/lib/rsshub" \ 59 --set "NODE_ENV" "production" \ 60 --set "NO_LOGFILES" "true" \ 61 --set "TSX_TSCONFIG_PATH" "$out/lib/rsshub/tsconfig.json" \ 62 --append-flags "$out/lib/rsshub/node_modules/tsx/dist/cli.mjs" \ 63 --append-flags "$out/lib/rsshub/lib/index.ts" 64 ''; 65 66 meta = { 67 description = "RSS feed generator"; 68 longDescription = '' 69 RSSHub is an open source, easy to use, and extensible RSS feed generator. 70 It's capable of generating RSS feeds from pretty much everything. 71 72 RSSHub delivers millions of contents aggregated from all kinds of sources, 73 our vibrant open source community is ensuring the deliver of RSSHub's new routes, 74 new features and bug fixes. 75 ''; 76 homepage = "https://docs.rsshub.app"; 77 license = lib.licenses.mit; 78 maintainers = with lib.maintainers; [ Guanran928 ]; 79 mainProgram = "rsshub"; 80 platforms = lib.platforms.all; 81 }; 82})