Skip to content

Commit f106cc6

Browse files
committed
fix(nix): restrict package source to git-tracked files
Replace denylist approach with gitTracked to exclude node_modules, dist, .git, and any other untracked artifacts from the derivation. Keeps the nix/flake/md exclusions as they are nix-only or non-source.
1 parent 456816a commit f106cc6

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

nix/package.nix

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,14 @@ buildNpmPackage {
1616
src =
1717
let
1818
fs = lib.fileset;
19-
maybe = fs.maybeMissing;
2019
in
2120
fs.toSource {
2221
root = ../.;
23-
fileset = fs.difference ../. (
22+
fileset = fs.difference (fs.gitTracked ../.) (
2423
fs.unions [
2524
../nix
2625
../flake.nix
2726
../flake.lock
28-
(maybe ../release)
29-
(maybe ../test-results)
30-
(maybe ../playwright-report)
31-
(maybe ../.github)
32-
(maybe ../.vscode)
33-
(maybe ../.idea)
34-
(maybe ../.kiro)
35-
(maybe ../.envrc)
36-
(maybe ../.direnv)
3727
(fs.fileFilter (file: file.hasExt "md") ../.)
3828
]
3929
);

0 commit comments

Comments
 (0)