Skip to content

Commit

Permalink
fix(flake): include *.nix files in git archive
Browse files Browse the repository at this point in the history
by not specifying `*.nix export-ignore` in `.gitattributes`.  Hopefully
this fixes this error for good:

    error: getting status of '/nix/store/kd87l94qzrkjrh91mrymdcqzllikslwj-source/flake.nix': No such file or directory

Where previous attempts (like removing `.gitattributes export-ignore`)
failed.

Oddly, it seems that changing *any* `export-ignore` directive in
`.gitattributes` "fixes" the problem, but only temporarily.  However,
since the error above complains specifically about a `*.nix` file, and
because all files not exluded in `.gitignore` or marked with
`export-ignore` in `.gitattributes` appear in the flake store path
(above, `/nix/store/kd87l94qzrkjrh91mrymdcqzllikslwj-source/flake.nix`),
it seems like un-ignoring all `*.nix` files ought to correct the
issue.
  • Loading branch information
tomeon committed Mar 18, 2024
1 parent b038f83 commit be3c8af
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
/vagrant/** export-ignore

# XXX do not exclude (a) the `/tests/` hierarchy, as doing so breaks GitHub
# Actions, or (b) the `.gitattributes` file, as this appears to break the Nix
# flake.
# Actions, or (b) `*.nix` files, as this appears to break the Nix flake.
# That is, do not do this:
# /tests/ export-ignore
# /tests/** export-ignore
# .gitattributes export-ignore
# *.nix export-ignore

*.nix export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
CONTRIBUTING.md export-ignore
Expand Down

0 comments on commit be3c8af

Please sign in to comment.