From affbd1aa4ff0250f7ac6e3cefed2907eeea80a1d Mon Sep 17 00:00:00 2001 From: wrvsrx Date: Thu, 6 Jun 2024 23:17:52 +0800 Subject: [PATCH] feat(pkgs/rsshub): reduce closure size --- pkgs/to-normal-packages/rsshub/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/to-normal-packages/rsshub/default.nix b/pkgs/to-normal-packages/rsshub/default.nix index b9d2db0..a411ed8 100644 --- a/pkgs/to-normal-packages/rsshub/default.nix +++ b/pkgs/to-normal-packages/rsshub/default.nix @@ -15,7 +15,14 @@ let inherit (source) pname version src; installEnv.PUPPETEER_SKIP_DOWNLOAD = "1"; noDevDependencies = true; - }).passthru.nodeModules; + }).passthru.nodeModules.overrideAttrs + (old: { + installPhase = + old.installPhase + + '' + rm -f $out/node_modules/.pnpm/lock.yaml + ''; + }); rsshub-website = stdenvNoCC.mkDerivation { inherit (source) pname version src; patches = [ @@ -51,6 +58,9 @@ let export { gitHash, gitDate }; '') ]; + passthru = { + inherit node-modules; + }; buildInputs = [ nodePackages.pnpm ]; buildPhase = '' ln -s ${node-modules}/node_modules node_modules