umami: skip pnpmDeps from other platforms

When fetching dependencies for all platforms (default for pnpm.fetchDeps)
the pnpmDeps derivation size increases to over 4GiB, which is above the
limit allowed by Hydra, failing the build there.
This commit removes the `--force` flag when executing `pnpm install`, so
only dependencies for the current platform are fetched and installed.
This commit is contained in:
Diogo Correia
2025-12-12 14:11:46 +00:00
parent 0072ad32ec
commit 18d4826508
+11 -5
View File
@@ -87,18 +87,24 @@ stdenvNoCC.mkDerivation (finalAttrs: {
hash = "sha256-rkOD52suE6bihJqKvMdIvqHRIcWhSxXzUkCfmdNbC40=";
};
# install dev dependencies as well, for rollup
pnpmInstallFlags = [ "--prod=false" ];
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs)
pname
pnpmInstallFlags
version
src
;
# prevent downloading dependencies for windows
# which bloat derivation size and fail to build on hydra
# https://github.com/NixOS/nixpkgs/pull/467820#issuecomment-3624054271
pnpmInstallFlags = [
"--force=false"
"--os=linux"
"--os=darwin"
"--cpu=x64"
"--cpu=arm64"
];
fetcherVersion = 2;
hash = "sha256-eXurT8kfVJcJoFunrt7h8LKuhsIhGrYDW6shvGA6GXY=";
hash = "sha256-bqeJ0wzCtnuR6V67Qe1N9UcaHPLziuBhsn7eN8JVJbQ=";
};
env.CYPRESS_INSTALL_BINARY = "0";