diff --git a/pkgs/by-name/gi/git/package.nix b/pkgs/by-name/gi/git/package.nix index 3d193e8055e2..fec62fc328b6 100644 --- a/pkgs/by-name/gi/git/package.nix +++ b/pkgs/by-name/gi/git/package.nix @@ -168,7 +168,7 @@ stdenv.mkDerivation (finalAttrs: { + lib.optionalString (rustSupport && (stdenv.buildPlatform != stdenv.hostPlatform)) '' substituteInPlace Makefile \ --replace-fail "RUST_TARGET_DIR = target/" \ - "RUST_TARGET_DIR = target/${stdenv.hostPlatform.rust.rustcTargetSpec}/" + "RUST_TARGET_DIR = target/${stdenv.hostPlatform.rust.cargoShortTarget}/" ''; nativeBuildInputs = [