mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
buildRustPackage: Add check phase and enable it by default
Also disable check phase in cargo as there are lots of failures (some probably due to trying to access the network).
This commit is contained in:
parent
5e8a447739
commit
d648be6724
@ -39,10 +39,17 @@ in stdenv.mkDerivation (args // {
|
||||
'' + (args.prePatch or "");
|
||||
|
||||
buildPhase = args.buildPhase or ''
|
||||
echo "Running cargo build"
|
||||
echo "Running cargo build --release"
|
||||
cargo build --release
|
||||
'';
|
||||
|
||||
checkPhase = args.checkPhase or ''
|
||||
echo "Running cargo test"
|
||||
cargo test
|
||||
'';
|
||||
|
||||
doCheck = args.doCheck or true;
|
||||
|
||||
installPhase = args.installPhase or ''
|
||||
mkdir -p $out/bin
|
||||
for f in $(find target/release -maxdepth 1 -type f); do
|
||||
|
@ -25,6 +25,10 @@ buildRustPackage rec {
|
||||
|
||||
buildPhase = "make";
|
||||
|
||||
# Disable check phase as there are lots of failures (some probably due to
|
||||
# trying to access the network).
|
||||
doCheck = false;
|
||||
|
||||
installPhase = ''
|
||||
make install
|
||||
${postInstall}
|
||||
|
@ -15,6 +15,10 @@ buildRustPackage rec {
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
preCheck = ''
|
||||
export RUST_SRC_PATH="${rustc.src}/src"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -p target/release/racer $out/bin/
|
||||
|
Loading…
Reference in New Issue
Block a user