Unverified Commit e7dd455b authored by Sefa Eyeoglu's avatar Sefa Eyeoglu
Browse files

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: default avatarSefa Eyeoglu <contact@scrumplex.net>
parent 65b04e5f
Loading
Loading
Loading
Loading
+19 −10
Original line number Diff line number Diff line
@@ -76,16 +76,25 @@ stdenvNoCC.mkDerivation (finalAttrs: {
    in
    {
      fetchDeps =
        lib.warn
          "pnpm.fetchDeps: The package attribute is deprecated. Use the top-level fetchPnpmDeps attribute instead"
          (
            { ... }@args:
            fetchPnpmDeps args
            // {
              pnpm = pnpm';
        };
      configHook = pnpmConfigHook.overrideAttrs (prevAttrs: {
            }
          );
      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 (