pnpm-fixup-state-db: make it depend on nodejs-slim
This commit is contained in:
@@ -52,19 +52,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"
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user