Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

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

cargo-llvm-cov: 0.5.33 -> 0.5.36

authored by Matthias Beyer and committed by GitHub 4af30c40 e8ad54f5

+17 -4
+17 -4
pkgs/development/tools/rust/cargo-llvm-cov/default.nix
··· 21 , fetchFromGitHub 22 , rustPlatform 23 , rustc 24 }: 25 26 let 27 pname = "cargo-llvm-cov"; 28 - version = "0.5.33"; 29 30 owner = "taiki-e"; 31 homepage = "https://github.com/${owner}/${pname}"; ··· 36 cargoLock = fetchurl { 37 name = "Cargo.lock"; 38 url = "https://crates.io/api/v1/crates/${pname}/${version}/download"; 39 - sha256 = "sha256-FDr1Yx2k9yTqnQbtkT8h8DErPe54/lswfbzZKM0Knpk="; 40 downloadToTemp = true; 41 postFetch = '' 42 tar xzf $downloadedFile ${pname}-${version}/Cargo.lock ··· 54 inherit owner; 55 repo = pname; 56 rev = "v${version}"; 57 - sha256 = "sha256-nlrQIzQc63XdUqWiHFXqjwzzNhgpEba7Rw4VE1d0yBU="; 58 }; 59 60 # Upstream doesn't include the lockfile so we need to add it back ··· 62 cp ${cargoLock} source/Cargo.lock 63 ''; 64 65 - cargoSha256 = "sha256-etMpCnbdSzaZnlzGlVnTL84VxInYFpuA4xrt8qNqbsQ="; 66 67 # `cargo-llvm-cov` reads these environment variables to find these binaries, 68 # which are needed to run the tests 69 LLVM_COV = "${llvm}/bin/llvm-cov"; 70 LLVM_PROFDATA = "${llvm}/bin/llvm-profdata"; 71 72 meta = { 73 inherit homepage;
··· 21 , fetchFromGitHub 22 , rustPlatform 23 , rustc 24 + , git 25 }: 26 27 let 28 pname = "cargo-llvm-cov"; 29 + version = "0.5.36"; 30 31 owner = "taiki-e"; 32 homepage = "https://github.com/${owner}/${pname}"; ··· 37 cargoLock = fetchurl { 38 name = "Cargo.lock"; 39 url = "https://crates.io/api/v1/crates/${pname}/${version}/download"; 40 + sha256 = "sha256-ZI5vxtMcIEtVPIeedha3S6GEvvQDBB9eyOFwkAAO22I="; 41 downloadToTemp = true; 42 postFetch = '' 43 tar xzf $downloadedFile ${pname}-${version}/Cargo.lock ··· 55 inherit owner; 56 repo = pname; 57 rev = "v${version}"; 58 + sha256 = "sha256-Ii21kjQ4nWEttvGY9bxhGmfLkI2MrAsYJZcwfE2y6uQ="; 59 + leaveDotGit = true; 60 }; 61 62 # Upstream doesn't include the lockfile so we need to add it back ··· 64 cp ${cargoLock} source/Cargo.lock 65 ''; 66 67 + cargoSha256 = "sha256-BHocUJpk4qplwMfpSXNTZjOpUCZGS676xYrqtSFnP7s="; 68 69 # `cargo-llvm-cov` reads these environment variables to find these binaries, 70 # which are needed to run the tests 71 LLVM_COV = "${llvm}/bin/llvm-cov"; 72 LLVM_PROFDATA = "${llvm}/bin/llvm-profdata"; 73 + 74 + nativeCheckInputs = [ 75 + git 76 + ]; 77 + 78 + preCheck = '' 79 + # `cargo-llvm-cov`'s tests rely on `git ls-files` so the staging area needs 80 + # to not have everything staged as deleted, which is how `leaveDotGit` in 81 + # `fetchFromGitHub` leaves the staging area for reproducibility reasons. 82 + git restore --staged . 83 + ''; 84 85 meta = { 86 inherit homepage;