Skip to content

Commit c682381

Browse files
committed
nix: ignore unnecessary files for the nix-build
1 parent 1fec8ca commit c682381

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

utils.nix

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,26 @@
99
}:
1010

1111
rec {
12-
# this removes the org scoping
12+
# This removes the org scoping
1313
basename = builtins.baseNameOf node2nixDev.packageName;
14-
src = nix-gitignore.gitignoreSource [".git" "/*.nix"] ./.;
14+
# Filter source to only what's necessary for building
15+
src = nix-gitignore.gitignoreSource [
16+
# The `.git` itself should be ignored
17+
".git"
18+
# Hidden files
19+
"/.*"
20+
# Nix files
21+
"/*.nix"
22+
# Benchmarks
23+
"/benches"
24+
# Docs
25+
"/docs"
26+
# Tests
27+
"/tests"
28+
"/jest.config.js"
29+
] ./.;
1530
nodeVersion = builtins.elemAt (lib.versions.splitVersion nodejs.version) 0;
16-
# custom node2nix directly from GitHub
31+
# Custom node2nix directly from GitHub
1732
node2nixSrc = fetchFromGitHub {
1833
owner = "svanderburg";
1934
repo = "node2nix";

0 commit comments

Comments
 (0)