pnpm: add warning for deprecated fetcher and configHook attributes

Deprecate package-level pnpm tooling in favor of top-level attributes.

This doesn't cause any rebuilds.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2025-12-18 12:24:09 +01:00
parent 65b04e5fb8
commit e7dd455b9d
+19 -10
View File
@@ -76,16 +76,25 @@ stdenvNoCC.mkDerivation (finalAttrs: {
in
{
fetchDeps =
{ ... }@args:
fetchPnpmDeps args
// {
pnpm = pnpm';
};
configHook = pnpmConfigHook.overrideAttrs (prevAttrs: {
propagatedBuildInputs = prevAttrs.propagatedBuildInputs or [ ] ++ [
pnpm'
];
});
lib.warn
"pnpm.fetchDeps: The package attribute is deprecated. Use the top-level fetchPnpmDeps attribute instead"
(
{ ... }@args:
fetchPnpmDeps args
// {
pnpm = pnpm';
}
);
configHook =
lib.warn
"pnpm.configHook: The package attribue is deprecated. Use the top-level pnpmConfigHook attribute instead"
(
pnpmConfigHook.overrideAttrs (prevAttrs: {
propagatedBuildInputs = prevAttrs.propagatedBuildInputs or [ ] ++ [
pnpm'
];
})
);
inherit majorVersion;
tests.version = lib.optionalAttrs withNode (