Skip to content

Commit

Permalink
Configure cargo to avoid any network access
Browse files Browse the repository at this point in the history
This became necessary starting with Rust nightly 2024-03-26. But it has
never been a good idea to access network in Nix builds.
  • Loading branch information
proski committed Apr 3, 2024
1 parent b2e09fd commit f7f5156
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions overlay/mkcrate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ let
configureCargo = ''
mkdir -p .cargo
cat > .cargo/config <<'EOF'
[net]
offline = true
[target."${rustBuildTriple}"]
linker = "${ccForBuild}"
'' + optionalString (codegenOpts != null && codegenOpts ? "${rustBuildTriple}") (''
Expand Down

0 comments on commit f7f5156

Please sign in to comment.