Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
nix: Coerce rel path to cargo wrapper script into abs path (#50919)
Jakub Konka5289bea46e32
diff --git a/nix/modules/devshells.nix b/nix/modules/devshells.nixindex cfc0e48b871..ab58d37fff2 100644--- a/nix/modules/devshells.nix+++ b/nix/modules/devshells.nix@@ -22,10 +22,14 @@# Cargo build timings wrapper scriptwrappedCargo = pkgs.writeShellApplication {name = "cargo";- runtimeInputs = [pkgs.nodejs];- text = ''- NIX_WRAPPER=1 CARGO=${rustToolchain}/bin/cargo ./script/cargo "$@"- '';+ runtimeInputs = [ pkgs.nodejs ];+ text =+ let+ pathToCargoScript = ./. + "/../../script/cargo";+ in+ ''+ NIX_WRAPPER=1 CARGO=${rustToolchain}/bin/cargo ${pathToCargoScript} "$@"+ '';};in{@@ -34,7 +38,7 @@inputsFrom = [ zed-editor ];packages = with pkgs; [- wrappedCargo # must be first, to shadow the `cargo` provided by `rustToolchain`+ wrappedCargo # must be first, to shadow the `cargo` provided by `rustToolchain`rustToolchain # cargo, rustc, and rust-toolchain.toml components includedcargo-nextestcargo-hakari