Skip to content

Commit 22be98a

Browse files
zahclaude
andcommitted
fix: Use self.outPath to include submodules in Nix build
When Nix builds with .?submodules=1, using self.outPath ensures that git submodules (like tree-sitter-nim) are included in the source copied to the build sandbox. Previously, src = ../../. only included files from the main repo, causing 'tree-sitter-nim' dependency errors during cargo build. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 1cb77cd commit 22be98a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

nix/packages/default.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ inputs, ... }:
1+
{ inputs, self, ... }:
22
{
33
perSystem =
44
{
@@ -9,7 +9,10 @@
99
let
1010
inherit (pkgs) stdenv;
1111

12-
src = ../../.;
12+
# Use self.outPath to get the flake source with submodules
13+
# When building with .?submodules=1, Nix will fetch submodules
14+
# and self.outPath will include them
15+
src = self.outPath;
1316

1417
# Import multiple Nim versions
1518
nimVersions = import ../nim-versions { inherit pkgs; };

0 commit comments

Comments
 (0)