Skip to content

Commit 0959819

Browse files
committed
fix(pkgs/jolt): Make cargo script which updates path instead of rustc script
1 parent 10dea37 commit 0959819

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

packages/jolt/default.nix

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,16 @@ in
5353
# Different toolchain is used when guest has std features
5454
# https://github.com/a16z/jolt/blob/fa45507aaddb1815bafd54332e4b14173a7f8699/jolt-core/src/host/mod.rs#L132-L134
5555
postInstall = ''
56-
rm $out/bin/rustc
57-
cat <<EOF > $out/bin/rustc
56+
rm $out/bin/cargo
57+
cat <<EOF > $out/bin/cargo
5858
#!/bin/sh
5959
if [ -z "\''${RUSTUP_TOOLCHAIN+x}" ]
6060
then
61-
${jolt-guest-rust}/rust/build/host/stage2/bin/rustc \$@
62-
else
63-
${rust-toolchain}/bin/rustc \$@
61+
export PATH="${jolt-guest-rust}/rust/build/host/stage2/bin:$PATH"
6462
fi
63+
${rust-toolchain}/bin/cargo \$@
6564
EOF
66-
chmod +x $out/bin/rustc
65+
chmod +x $out/bin/cargo
6766
'';
6867

6968
doCheck = false;

0 commit comments

Comments
 (0)