Skip to content

Commit

Permalink
feat(pkgs/rsshub,metacubexd): use pnpm_9
Browse files Browse the repository at this point in the history
  • Loading branch information
wrvsrx committed Jun 9, 2024
1 parent c487f60 commit 1a4c90f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
7 changes: 4 additions & 3 deletions pkgs/to-normal-packages/metacubexd/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
source,
nodePackages,
nodejs,
pnpm,
vips,
lib,
pkg-config,
Expand All @@ -13,11 +15,10 @@ let
in
mkPnpmPackage {
inherit (source) pname src;
inherit version;
inherit (nodePackages) nodejs;
inherit version pnpm nodejs;
installEnv = {
# otherwise, node-gyp will try to download node headers from internet
npm_config_nodedir = "${nodePackages.nodejs}";
npm_config_nodedir = "${nodejs}";
};
extraBuildInputs = [
nodePackages.node-gyp
Expand Down
11 changes: 8 additions & 3 deletions pkgs/to-normal-packages/rsshub/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
mkPnpmPackage,
pnpm,
stdenvNoCC,
nodePackages,
nodejs,
writeText,
writeShellScriptBin,
bash,
Expand All @@ -13,6 +14,7 @@ let
node-modules =
(mkPnpmPackage {
inherit (source) pname version src;
inherit pnpm;
installEnv.PUPPETEER_SKIP_DOWNLOAD = "1";
noDevDependencies = true;
}).passthru.nodeModules.overrideAttrs
Expand Down Expand Up @@ -61,7 +63,10 @@ let
passthru = {
inherit node-modules;
};
buildInputs = [ nodePackages.pnpm ];
nativeBuildInputs = [
pnpm
nodejs
];
buildPhase = ''
ln -s ${node-modules}/node_modules node_modules
pnpm build
Expand All @@ -77,7 +82,7 @@ let
cat > $out/bin/rsshub <<- EOF
#!${bash}/bin/bash
TSX_TSCONFIG_PATH=$out/tsconfig.json ${nodePackages.nodejs}/bin/node $out/node_modules/tsx/dist/cli.mjs $out/lib/index.ts
TSX_TSCONFIG_PATH=$out/tsconfig.json ${nodejs}/bin/node $out/node_modules/tsx/dist/cli.mjs $out/lib/index.ts
EOF
chmod +x $out/bin/rsshub
'';
Expand Down

0 comments on commit 1a4c90f

Please sign in to comment.