Packaging with pnpm: vite not found

Turns out it was two problems:

First, it didn’t seem to install every dependency. This is fixed by setting pnpmRoot and sourceRoot:

          pnpmRoot = "frontend";
          pnpmDepsHash = "sha256-woA5C1airy7eKbk3EP7cggldNFpz+9y68A16QkGrmeA=";
          pnpmDeps = pkgs.pnpm.fetchDeps {
            inherit (finalAttrs) src pname version;
            hash = pnpmDepsHash;
            sourceRoot = "${finalAttrs.src}/frontend";
          };

Second, cd $src/frontend is wrong because $src is readonly. The source code is already copied to the current directory, so I only need cd frontend.