lol

makeRustPlatform: add rustLibSrc

rust-analyzer: rustcSrc -> rustLibSrc to fix build

oxalica 68060f6f 7ac7ce8b

+19 -3
+4
pkgs/development/compilers/rust/make-rust-platform.nix
··· 18 18 rustcSrc = callPackage ./rust-src.nix { 19 19 inherit rustc; 20 20 }; 21 + 22 + rustLibSrc = callPackage ./rust-lib-src.nix { 23 + inherit rustc; 24 + }; 21 25 }
+11
pkgs/development/compilers/rust/rust-lib-src.nix
··· 1 + { stdenv, rustc }: 2 + 3 + stdenv.mkDerivation { 4 + name = "rust-lib-src"; 5 + src = rustc.src; 6 + phases = [ "unpackPhase" "installPhase" ]; 7 + 8 + installPhase = '' 9 + mv library $out 10 + ''; 11 + }
+1 -1
pkgs/development/tools/rust/rust-analyzer/generic.nix
··· 29 29 30 30 inherit doCheck; 31 31 preCheck = lib.optionalString doCheck '' 32 - export RUST_SRC_PATH=${rustPlatform.rustcSrc} 32 + export RUST_SRC_PATH=${rustPlatform.rustLibSrc} 33 33 ''; 34 34 35 35 doInstallCheck = true;
+3 -2
pkgs/development/tools/rust/rust-analyzer/wrapper.nix
··· 4 4 unwrapped, 5 5 pname ? "rust-analyzer", 6 6 version ? unwrapped.version, 7 - rustcSrc ? rustPlatform.rustcSrc, 7 + # Use name from `RUST_SRC_PATH` 8 + rustSrc ? rustPlatform.rustLibSrc, 8 9 }: runCommandNoCC "${pname}-${version}" { 9 10 inherit pname version; 10 11 inherit (unwrapped) src meta; ··· 12 13 } '' 13 14 mkdir -p $out/bin 14 15 makeWrapper ${unwrapped}/bin/rust-analyzer $out/bin/rust-analyzer \ 15 - --set-default RUST_SRC_PATH "${rustcSrc}" 16 + --set-default RUST_SRC_PATH "${rustSrc}" 16 17 '')