From e7dd455b9ded56d7ad97f523a7acfe4c88dbf5da Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Wed, 10 Dec 2025 12:25:26 +0100 Subject: [PATCH] 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 --- pkgs/development/tools/pnpm/generic.nix | 29 ++++++++++++++++--------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/pnpm/generic.nix b/pkgs/development/tools/pnpm/generic.nix index 5d7c7be33574..35bf64af696e 100644 --- a/pkgs/development/tools/pnpm/generic.nix +++ b/pkgs/development/tools/pnpm/generic.nix @@ -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 (