at 18.03-beta 38 lines 1.0 kB view raw
1{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper, rustup, substituteAll }: 2 3rustPlatform.buildRustPackage rec { 4 name = "racer-${version}"; 5 version = "2.0.12"; 6 7 src = fetchFromGitHub { 8 owner = "racer-rust"; 9 repo = "racer"; 10 rev = version; 11 sha256 = "0y1xlpjr8y8gsmmrjlykx4vwzf8akk42g35kg3kc419ry4fli945"; 12 }; 13 14 cargoSha256 = "1h3jv4hajdv6k309kjr6b6298kxmd0faw081i3788sl794k9mp0j"; 15 16 # rustup is required for test 17 buildInputs = [ makeWrapper rustup ]; 18 19 preCheck = '' 20 export RUST_SRC_PATH="${rustPlatform.rustcSrc}" 21 ''; 22 patches = [ 23 (substituteAll { 24 src = ./rust-src.patch; 25 inherit (rustPlatform) rustcSrc; 26 }) 27 ./ignore-tests.patch 28 ]; 29 doCheck = true; 30 31 meta = with stdenv.lib; { 32 description = "A utility intended to provide Rust code completion for editors and IDEs"; 33 homepage = https://github.com/racer-rust/racer; 34 license = licenses.mit; 35 maintainers = with maintainers; [ jagajaga globin ]; 36 platforms = platforms.all; 37 }; 38}