feat: fixed new build with deps

This commit is contained in:
Leyla Becker 2026-02-22 14:05:23 -06:00
parent 53c25c9da3
commit f5009d09bb

View file

@ -7,7 +7,7 @@
pnpmConfigHook,
git,
siteUrl,
sourcePath ? ./..
sourcePath ? ./..,
}: let
nodejs = nodejs_latest;
pnpm = pnpm_10;
@ -15,18 +15,19 @@
# Filter source: use cleanSourceFilter as base, but include .git and exclude _site
filteredSrc = lib.cleanSourceWith {
src = sourcePath;
filter = path: type:
let
filter = path: type: let
baseName = baseNameOf path;
# Always include .git directory
isGit = baseName == ".git" || lib.hasInfix "/.git/" path || lib.hasSuffix "/.git" path;
in
isGit || (
isGit
|| (
# Apply base cleanSourceFilter
lib.cleanSourceFilter path type &&
lib.cleanSourceFilter path type
&&
# Additional exclusions
baseName != "_site" &&
baseName != "node_modules"
baseName != "_site"
&& baseName != "node_modules"
);
};
in
@ -48,7 +49,7 @@ in
pnpmDeps = fetchPnpmDeps {
inherit (finalAttrs) pname version;
src = lib.cleanSource sourcePath;
hash = "sha256-rN8P6g/Wuug+fv0rm/qbKN01NgcbpgEQmhDFe2X42uA=";
hash = "sha256-OaSZ8eY6idDv16BhmOTkOeis19SXjPRg+QUtf68TDQI=";
fetcherVersion = 3; # pnpm store version
};