Commit 5962af3
flake: fetch inputs via git+https instead of github: shorthand
The `github:` flake-ref shorthand fetches source as tarballs from
api.github.com / codeload.github.com. In the Claude Code web sandbox these
endpoints are served by a GitHub proxy that scopes access to the session's
own repositories and returns HTTP 403 for every other repo, so `nix develop`
fails while resolving third-party inputs (flake-parts, nixpkgs, agda.nix and
its transitive Agda libraries).
Plain git-over-https, by contrast, is served by that proxy for any public
repo. Declaring the inputs as `git+https://github.com/...` and pinning the
lock nodes to the `git` fetcher routes resolution through the working path.
The narHash for each rev is identical between the two fetchers, so the pins
are unchanged and this is a no-op on unrestricted networks.
nixpkgs additionally sets `shallow=1`: when the pinned source cannot be
substituted by narHash from a binary cache, a shallow fetch of the locked
rev avoids cloning nixpkgs' full history.
Verified with `nix develop --command agda --version` (Agda 2.8.0).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1ArmS9aNbCxuwhC7zYLBx1 parent 193d640 commit 5962af3
2 files changed
Lines changed: 51 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | | - | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | | - | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
13 | | - | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
0 commit comments