From 4b544285bfb5424f104f9f1a6a8f6a7142c3a4a0 Mon Sep 17 00:00:00 2001 From: oxalica Date: Tue, 11 May 2021 23:20:41 +0800 Subject: [PATCH] rust-analyzer: 2021-04-19 -> 2021-05-10 (#122474) --- .../tools/rust/rust-analyzer/default.nix | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/rust/rust-analyzer/default.nix b/pkgs/development/tools/rust/rust-analyzer/default.nix index 4a30a70fa09a..8d4ae0ac369c 100644 --- a/pkgs/development/tools/rust/rust-analyzer/default.nix +++ b/pkgs/development/tools/rust/rust-analyzer/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, cmake +{ lib, stdenv, fetchFromGitHub, rustPlatform, CoreServices, cmake, fetchpatch , libiconv , useMimalloc ? false , doCheck ? true @@ -6,16 +6,32 @@ rustPlatform.buildRustPackage rec { pname = "rust-analyzer-unwrapped"; - version = "2021-04-19"; - cargoSha256 = "sha256-CXkI3CQ/v6RBMM2Dpp2u+qnRwba+nqzeaPSJGBiQUoY="; + version = "2021-05-10"; + cargoSha256 = "sha256-PUecBFdYIJFZa5IwwNnuXOkuxtyrzWhxy3C+2jv/hvU="; src = fetchFromGitHub { owner = "rust-analyzer"; repo = "rust-analyzer"; rev = version; - sha256 = "sha256-W/cUwZEvlUXzqQ/futeNFwDWR/cTL/RLZaW2srIs83Q="; + sha256 = "sha256-oz6FqRMEUUTS4X2XhpWjp2JIgl1A6wQv2OU8auwUoVM="; }; + patches = [ + # Revert updates which require rust 1.52.0. + # We currently have rust 1.51.0 in nixpkgs. + # https://github.com/rust-analyzer/rust-analyzer/pull/8718 + (fetchpatch { + url = "https://github.com/rust-analyzer/rust-analyzer/pull/8718/commits/607d8a2f61e56fabb7a3bc5132592917fcdca970.patch"; + sha256 = "sha256-g1yyq/XSwGxftnqSW1bR5UeMW4gW28f4JciGvwQ/n08="; + revert = true; + }) + (fetchpatch { + url = "https://github.com/rust-analyzer/rust-analyzer/pull/8718/commits/6a16ec52aa0d91945577c99cdf421b303b59301e.patch"; + sha256 = "sha256-n7Ew/0fG8zPaMFCi8FVLjQZwJSaczI/QoehC6pDLrAk="; + revert = true; + }) + ]; + buildAndTestSubdir = "crates/rust-analyzer"; cargoBuildFlags = lib.optional useMimalloc "--features=mimalloc";