Skip to content

fix(nix): vendor Cargo dependencies - #80

Merged
raine merged 2 commits into
raine:mainfrom
jakob1379:fix/nix-build
Jul 26, 2026
Merged

fix(nix): vendor Cargo dependencies#80
raine merged 2 commits into
raine:mainfrom
jakob1379:fix/nix-build

Conversation

@jakob1379

Copy link
Copy Markdown
Contributor

Summary

  • build the package with rustPlatform.buildRustPackage
  • vendor dependencies from the checked-in Cargo.lock

Why

The custom build phase invoked Cargo without vendored dependencies. Nix's
sandbox blocks network access during builds, so Cargo failed while resolving
index.crates.io.

Using the native Rust builder makes the Cargo phase run offline and keeps
dependency versions tied to the lockfile.

Validation

  • nix build --print-build-logs
  • 667 Rust tests passed during the Nix build
  • ./result/bin/claude-code-proxy --version returned 0.1.25

AI usage

OpenAI Codex was used during development to diagnose the failure, implement the
change, and run the validation above.

@jakob1379
jakob1379 marked this pull request as ready for review July 26, 2026 15:43
The package tests use loopback networking, which is unavailable in the Nix
sandbox on Darwin. Keep tests in the regular test workflow instead of running
them as part of the package derivation.

Build the package under the default sandbox in CI so accidental network access
or undeclared dependencies cause the check to fail.
@raine
raine merged commit 651e658 into raine:main Jul 26, 2026
@raine

raine commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Thanks

@jakob1379
jakob1379 deleted the fix/nix-build branch July 27, 2026 09:23
bp0lr pushed a commit to bp0lr/claude-code-proxy that referenced this pull request Aug 29, 2026
* fix(nix): vendor Cargo dependencies

* make nix build hermetic

The package tests use loopback networking, which is unavailable in the Nix
sandbox on Darwin. Keep tests in the regular test workflow instead of running
them as part of the package derivation.

Build the package under the default sandbox in CI so accidental network access
or undeclared dependencies cause the check to fail.

---------

Co-authored-by: Raine Virta <raine.virta@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants