build: use top-level fetchPnpmDeps/pnpmConfigHook + fetcherVersion=2

Nixpkgs deprecated pkgs.pnpm.{fetchDeps,configHook} in favor of the
top-level pkgs.fetchPnpmDeps and pkgs.pnpmConfigHook. fetchPnpmDeps now
requires fetcherVersion to be set; 2 is correct for pnpm v9+ lockfiles.
This commit is contained in:
Padreug 2026-05-23 10:55:50 +02:00
commit 3cd8f014f7

View file

@ -18,12 +18,13 @@ let
# Fixed-output derivation of the pnpm offline store. # Fixed-output derivation of the pnpm offline store.
# On first build / lockfile change, set hash = lib.fakeHash and rebuild; # On first build / lockfile change, set hash = lib.fakeHash and rebuild;
# Nix will report the correct hash to substitute. # Nix will report the correct hash to substitute.
pnpmDeps = pkgs.pnpm.fetchDeps { pnpmDeps = pkgs.fetchPnpmDeps {
inherit (finalAttrs) pname version src; inherit (finalAttrs) pname version src;
hash = cfg.pnpmDepsHash; hash = cfg.pnpmDepsHash;
fetcherVersion = 2;
}; };
nativeBuildInputs = [ pkgs.nodejs_20 pkgs.pnpm.configHook ]; nativeBuildInputs = [ pkgs.nodejs_20 pkgs.pnpmConfigHook ];
# Skip Electron binary download (we're building a web app, not desktop) # Skip Electron binary download (we're building a web app, not desktop)
ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; ELECTRON_SKIP_BINARY_DOWNLOAD = "1";