Merge pull request #264606 from CobaltCause/cargo-llvm-cov

cargo-llvm-cov: 0.5.33 -> 0.5.36

Changed files
+17 -4
pkgs
development
tools
rust
cargo-llvm-cov
+17 -4
pkgs/development/tools/rust/cargo-llvm-cov/default.nix
···
, fetchFromGitHub
, rustPlatform
, rustc
}:
let
pname = "cargo-llvm-cov";
-
version = "0.5.33";
owner = "taiki-e";
homepage = "https://github.com/${owner}/${pname}";
···
cargoLock = fetchurl {
name = "Cargo.lock";
url = "https://crates.io/api/v1/crates/${pname}/${version}/download";
-
sha256 = "sha256-FDr1Yx2k9yTqnQbtkT8h8DErPe54/lswfbzZKM0Knpk=";
downloadToTemp = true;
postFetch = ''
tar xzf $downloadedFile ${pname}-${version}/Cargo.lock
···
inherit owner;
repo = pname;
rev = "v${version}";
-
sha256 = "sha256-nlrQIzQc63XdUqWiHFXqjwzzNhgpEba7Rw4VE1d0yBU=";
};
# Upstream doesn't include the lockfile so we need to add it back
···
cp ${cargoLock} source/Cargo.lock
'';
-
cargoSha256 = "sha256-etMpCnbdSzaZnlzGlVnTL84VxInYFpuA4xrt8qNqbsQ=";
# `cargo-llvm-cov` reads these environment variables to find these binaries,
# which are needed to run the tests
LLVM_COV = "${llvm}/bin/llvm-cov";
LLVM_PROFDATA = "${llvm}/bin/llvm-profdata";
meta = {
inherit homepage;
···
, fetchFromGitHub
, rustPlatform
, rustc
+
, git
}:
let
pname = "cargo-llvm-cov";
+
version = "0.5.36";
owner = "taiki-e";
homepage = "https://github.com/${owner}/${pname}";
···
cargoLock = fetchurl {
name = "Cargo.lock";
url = "https://crates.io/api/v1/crates/${pname}/${version}/download";
+
sha256 = "sha256-ZI5vxtMcIEtVPIeedha3S6GEvvQDBB9eyOFwkAAO22I=";
downloadToTemp = true;
postFetch = ''
tar xzf $downloadedFile ${pname}-${version}/Cargo.lock
···
inherit owner;
repo = pname;
rev = "v${version}";
+
sha256 = "sha256-Ii21kjQ4nWEttvGY9bxhGmfLkI2MrAsYJZcwfE2y6uQ=";
+
leaveDotGit = true;
};
# Upstream doesn't include the lockfile so we need to add it back
···
cp ${cargoLock} source/Cargo.lock
'';
+
cargoSha256 = "sha256-BHocUJpk4qplwMfpSXNTZjOpUCZGS676xYrqtSFnP7s=";
# `cargo-llvm-cov` reads these environment variables to find these binaries,
# which are needed to run the tests
LLVM_COV = "${llvm}/bin/llvm-cov";
LLVM_PROFDATA = "${llvm}/bin/llvm-profdata";
+
+
nativeCheckInputs = [
+
git
+
];
+
+
preCheck = ''
+
# `cargo-llvm-cov`'s tests rely on `git ls-files` so the staging area needs
+
# to not have everything staged as deleted, which is how `leaveDotGit` in
+
# `fetchFromGitHub` leaves the staging area for reproducibility reasons.
+
git restore --staged .
+
'';
meta = {
inherit homepage;