mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
pnpm-fixup-state-db: make it depend on nodejs-slim
(cherry picked from commit 3f318e99f1)
This commit is contained in:
parent
42214e85ea
commit
762761c420
2 changed files with 5 additions and 16 deletions
|
|
@ -54,19 +54,7 @@ in
|
|||
pnpm-fixup-state-db' =
|
||||
if pnpm.nodejs-slim or null != null then
|
||||
pnpm-fixup-state-db.override {
|
||||
# FIXME: make npm-config-hook accept nodejs-slim
|
||||
nodejs =
|
||||
let
|
||||
inherit (pnpm) nodejs-slim;
|
||||
in
|
||||
if nodejs-slim ? paths && builtins.isList nodejs-slim.paths then
|
||||
# If nodejs-slim has a list `paths` attribute, it's likely a simlinkJoin
|
||||
nodejs-slim
|
||||
else
|
||||
# Otherwise we need to recreate one by overriding the default one
|
||||
pnpm-fixup-state-db.nodejs.override {
|
||||
inherit nodejs-slim;
|
||||
};
|
||||
inherit (pnpm) nodejs-slim;
|
||||
}
|
||||
else
|
||||
pnpm-fixup-state-db;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
buildNpmPackage,
|
||||
lib,
|
||||
nodejs,
|
||||
nodejs-slim,
|
||||
pnpm,
|
||||
tests,
|
||||
}:
|
||||
|
|
@ -11,12 +11,13 @@ buildNpmPackage {
|
|||
|
||||
src = ./src;
|
||||
|
||||
inherit nodejs;
|
||||
nodejs = nodejs-slim;
|
||||
nativeBuildInputs = lib.optional (builtins.hasAttr "npm" nodejs-slim) nodejs-slim.npm;
|
||||
|
||||
npmDepsHash = "sha256-um6a4pEtPtdxHBRq9g5ZW20wIQAMjWJ3qF96XuxJg8o=";
|
||||
|
||||
postInstall = ''
|
||||
makeWrapper ${lib.getExe nodejs} $out/bin/pnpm-fixup-state-db \
|
||||
makeWrapper ${lib.getExe nodejs-slim} $out/bin/pnpm-fixup-state-db \
|
||||
--add-flags "$out/lib/node_modules/pnpm-fixup-state-db"
|
||||
'';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue