Skip to content

Commit 91cedc4

Browse files
committed
fix(pkgs/risc0-rust): Add explanation why result is copied in another directory
1 parent 0327c0f commit 91cedc4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/risc0-rust/default.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ stdenv.mkDerivation rec {
2121
mkdir -p "$out"
2222
cp -r ./* "$out/"
2323
24+
# This is needed because RISC0 expects a toolchain directory, which contains
25+
# risc0 rust versions in folders, following a specific naming scheme
26+
# https://github.com/risc0/risc0/blob/0181c41119cf14e3f0f302e5ede1f20f6a1f81ce/rzup/src/paths.rs#L102-L142
27+
# Circumventing the toolchain directory (and overall the forced ~/.risc0 path)
28+
# is done by patching the codebase in the risc0 package.
29+
# Result is copied, not symlinked, in case risc0 iterates all subdirectories.
2430
mkdir -p "$out/r0.${version}-risc0-rust-x86_64-unknown-linux-gnu"
2531
cp -r ./* "$out/r0.${version}-risc0-rust-x86_64-unknown-linux-gnu"
2632

0 commit comments

Comments
 (0)