forked from mirrors/nixpkgs
eb11feaa0b
Changes the default fetcher in the Rust Platform to be the newer `fetchCargoTarball`, and changes every application using the current default to instead opt out. This commit does not change any hashes or cause any rebuilds. Once integrated, we will start deleting the opt-outs and recomputing hashes. See #79975 for details.
43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{ stdenv, fetchFromGitHub, rustPlatform, makeWrapper , Security }:
|
|
|
|
with rustPlatform;
|
|
|
|
buildRustPackage rec {
|
|
pname = "racerd";
|
|
version = "unstable-2019-09-02";
|
|
src = fetchFromGitHub {
|
|
owner = "jwilm";
|
|
repo = "racerd";
|
|
rev = "e3d380b9a1d3f3b67286d60465746bc89fea9098";
|
|
sha256 = "13jqdvjk4savcl03mrn2vzgdsd7vxv2racqbyavrxp2cm9h6cjln";
|
|
};
|
|
|
|
# a nightly compiler is required unless we use this cheat code.
|
|
RUSTC_BOOTSTRAP=1;
|
|
|
|
doCheck = false;
|
|
|
|
# Delete this on next update; see #79975 for details
|
|
legacyCargoFetcher = true;
|
|
|
|
cargoSha256 = "07130587drrdkrk7aqb8pl8i3p485qr6xh1m86630ydlnb9z6s6i";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
|
|
|
|
RUST_SRC_PATH = rustPlatform.rustcSrc;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp -p target/release/racerd $out/bin/
|
|
wrapProgram $out/bin/racerd --set-default RUST_SRC_PATH "$RUST_SRC_PATH"
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "JSON/HTTP Server based on racer for adding Rust support to editors and IDEs";
|
|
homepage = https://github.com/jwilm/racerd;
|
|
license = licenses.asl20;
|
|
platforms = platforms.all;
|
|
};
|
|
}
|