From 61b8a2c72011b5dd53f212cc9edcc2078ba28bde Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 4 Jan 2021 21:13:49 +0100 Subject: [PATCH] rustracer: 2.1.35 -> 2.1.40, fix build Failing build: https://hydra.nixos.org/build/134175791 ChangeLog: https://github.com/racer-rust/racer/blob/v2.1.40/CHANGELOG.md A few more things are worth noting: * It's not possible to update to latest version (2.1.42) at the time of committing since this requires a newer `rustc` (1.51 to be precise) to compile. * For proper completion, `rustLibSrc` rather than `rustcSrc` must be used now. The two were separated here previously[1]. * Dropped the `checkPhase` and replaced it with a list of `checkFlags`. This has the benefit that the default `checkPhase` from `buildRustPackage` can be used which properly configures parallelism and which target to use (i.e. `release` in this case which reduces build time). [1] 68060f6f6f491201724192ea0997d67dbeb2e302 --- pkgs/development/tools/rust/racer/default.nix | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/pkgs/development/tools/rust/racer/default.nix b/pkgs/development/tools/rust/racer/default.nix index 86f1989729e..7de30855dd3 100644 --- a/pkgs/development/tools/rust/racer/default.nix +++ b/pkgs/development/tools/rust/racer/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "racer"; - version = "2.1.35"; + version = "2.1.40"; src = fetchFromGitHub { owner = "racer-rust"; repo = "racer"; rev = "v${version}"; - sha256 = "0c00b81s7abnadjbf4i39lhdkipx7z44sr8p78jd1fl61yyrspli"; + sha256 = "sha256-8Is+RBfcXKbGSFzYoolLHs30rxlNI//xVGEOhxP2TV8="; }; - cargoSha256 = "1nbp2jp65fqwsq9i04iyi4pbszs035w6id50p5ypw234cqxznikm"; + cargoSha256 = "sha256-iUomr9viCdZk4nV75/OP8vHtJpMbmy+pq1IbaA2lLmE="; nativeBuildInputs = [ makeWrapper ]; buildInputs = stdenv.lib.optional stdenv.isDarwin Security; @@ -19,21 +19,20 @@ rustPlatform.buildRustPackage rec { # a nightly compiler is required unless we use this cheat code. RUSTC_BOOTSTRAP = 1; - RUST_SRC_PATH = rustPlatform.rustcSrc; + RUST_SRC_PATH = rustPlatform.rustLibSrc; postInstall = '' - wrapProgram $out/bin/racer --set-default RUST_SRC_PATH ${rustPlatform.rustcSrc} + wrapProgram $out/bin/racer --set-default RUST_SRC_PATH ${rustPlatform.rustLibSrc} ''; - checkPhase = '' - cargo test -- \ - --skip nameres::test_do_file_search_std \ - --skip util::test_get_rust_src_path_rustup_ok \ - --skip util::test_get_rust_src_path_not_rust_source_tree \ - --skip extern --skip completes_pub_fn --skip find_crate_doc \ - --skip follows_use_local_package --skip follows_use_for_reexport \ - --skip follows_rand_crate --skip get_completion_in_example_dir \ - --skip test_resolve_global_path_in_modules - ''; + checkFlags = [ + "--skip nameres::test_do_file_search_std" + "--skip util::test_get_rust_src_path_rustup_ok" + "--skip util::test_get_rust_src_path_not_rust_source_tree" + "--skip extern --skip completes_pub_fn --skip find_crate_doc" + "--skip follows_use_local_package --skip follows_use_for_reexport" + "--skip follows_rand_crate --skip get_completion_in_example_dir" + "--skip test_resolve_global_path_in_modules" + ]; doInstallCheck = true; installCheckPhase = ''