From a946f9e71def31553664173ed5868a9401e62cb6 Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Tue, 31 Oct 2023 08:22:39 -0700 Subject: [PATCH 1/3] cargo-llvm-cov: 0.5.33 -> 0.5.34 `cargo-llvm-cov` changed up its test suite a bit so we need to account for those changes too. --- .../tools/rust/cargo-llvm-cov/default.nix | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-llvm-cov/default.nix b/pkgs/development/tools/rust/cargo-llvm-cov/default.nix index f591540785cd..380bf2635bcf 100644 --- a/pkgs/development/tools/rust/cargo-llvm-cov/default.nix +++ b/pkgs/development/tools/rust/cargo-llvm-cov/default.nix @@ -21,11 +21,12 @@ , fetchFromGitHub , rustPlatform , rustc +, git }: let pname = "cargo-llvm-cov"; - version = "0.5.33"; + version = "0.5.34"; owner = "taiki-e"; homepage = "https://github.com/${owner}/${pname}"; @@ -36,7 +37,7 @@ let cargoLock = fetchurl { name = "Cargo.lock"; url = "https://crates.io/api/v1/crates/${pname}/${version}/download"; - sha256 = "sha256-FDr1Yx2k9yTqnQbtkT8h8DErPe54/lswfbzZKM0Knpk="; + sha256 = "sha256-lPcJ266XeslaxGOb88RbmZKJrg0YlD4HGPqBEkr4bKI="; downloadToTemp = true; postFetch = '' tar xzf $downloadedFile ${pname}-${version}/Cargo.lock @@ -54,7 +55,8 @@ rustPlatform.buildRustPackage { inherit owner; repo = pname; rev = "v${version}"; - sha256 = "sha256-nlrQIzQc63XdUqWiHFXqjwzzNhgpEba7Rw4VE1d0yBU="; + sha256 = "sha256-DWDT2B/eyqI0hLgswplzxDYn29iLCxhvV/aGMHikPCo="; + leaveDotGit = true; }; # Upstream doesn't include the lockfile so we need to add it back @@ -62,13 +64,24 @@ rustPlatform.buildRustPackage { cp ${cargoLock} source/Cargo.lock ''; - cargoSha256 = "sha256-etMpCnbdSzaZnlzGlVnTL84VxInYFpuA4xrt8qNqbsQ="; + cargoSha256 = "sha256-7zXLLF3HL6fA1DVwwilOZ9D+iCnRKvSORl6O0wd+vw0="; # `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; changelog = homepage + "/blob/v${version}/CHANGELOG.md"; From 3dfc0c74865bf0f20db121fc190dc1253e9a8eab Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Tue, 31 Oct 2023 08:26:42 -0700 Subject: [PATCH 2/3] cargo-llvm-cov: 0.5.34 -> 0.5.35 --- pkgs/development/tools/rust/cargo-llvm-cov/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-llvm-cov/default.nix b/pkgs/development/tools/rust/cargo-llvm-cov/default.nix index 380bf2635bcf..51431077de96 100644 --- a/pkgs/development/tools/rust/cargo-llvm-cov/default.nix +++ b/pkgs/development/tools/rust/cargo-llvm-cov/default.nix @@ -26,7 +26,7 @@ let pname = "cargo-llvm-cov"; - version = "0.5.34"; + version = "0.5.35"; owner = "taiki-e"; homepage = "https://github.com/${owner}/${pname}"; @@ -37,7 +37,7 @@ let cargoLock = fetchurl { name = "Cargo.lock"; url = "https://crates.io/api/v1/crates/${pname}/${version}/download"; - sha256 = "sha256-lPcJ266XeslaxGOb88RbmZKJrg0YlD4HGPqBEkr4bKI="; + sha256 = "sha256-PpCdx5YvmrsyHjjRAiFc1D7BSt0rZZmGzYe8jluazAc="; downloadToTemp = true; postFetch = '' tar xzf $downloadedFile ${pname}-${version}/Cargo.lock @@ -55,7 +55,7 @@ rustPlatform.buildRustPackage { inherit owner; repo = pname; rev = "v${version}"; - sha256 = "sha256-DWDT2B/eyqI0hLgswplzxDYn29iLCxhvV/aGMHikPCo="; + sha256 = "sha256-059k2z+ZtpWgZjoFZKIHF+OHYnBcUUO/4REWW5XRHkw="; leaveDotGit = true; }; @@ -64,7 +64,7 @@ rustPlatform.buildRustPackage { cp ${cargoLock} source/Cargo.lock ''; - cargoSha256 = "sha256-7zXLLF3HL6fA1DVwwilOZ9D+iCnRKvSORl6O0wd+vw0="; + cargoSha256 = "sha256-mmKUYOdd+/R5CDhZgtXCi+MGGsmUeNHv7Tzc74p8GwI="; # `cargo-llvm-cov` reads these environment variables to find these binaries, # which are needed to run the tests From b57a3544ff64b4a9f217c67fdb0259730602f75c Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Tue, 31 Oct 2023 08:29:46 -0700 Subject: [PATCH 3/3] cargo-llvm-cov: 0.5.35 -> 0.5.36 --- pkgs/development/tools/rust/cargo-llvm-cov/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-llvm-cov/default.nix b/pkgs/development/tools/rust/cargo-llvm-cov/default.nix index 51431077de96..43df364abae7 100644 --- a/pkgs/development/tools/rust/cargo-llvm-cov/default.nix +++ b/pkgs/development/tools/rust/cargo-llvm-cov/default.nix @@ -26,7 +26,7 @@ let pname = "cargo-llvm-cov"; - version = "0.5.35"; + version = "0.5.36"; owner = "taiki-e"; homepage = "https://github.com/${owner}/${pname}"; @@ -37,7 +37,7 @@ let cargoLock = fetchurl { name = "Cargo.lock"; url = "https://crates.io/api/v1/crates/${pname}/${version}/download"; - sha256 = "sha256-PpCdx5YvmrsyHjjRAiFc1D7BSt0rZZmGzYe8jluazAc="; + sha256 = "sha256-ZI5vxtMcIEtVPIeedha3S6GEvvQDBB9eyOFwkAAO22I="; downloadToTemp = true; postFetch = '' tar xzf $downloadedFile ${pname}-${version}/Cargo.lock @@ -55,7 +55,7 @@ rustPlatform.buildRustPackage { inherit owner; repo = pname; rev = "v${version}"; - sha256 = "sha256-059k2z+ZtpWgZjoFZKIHF+OHYnBcUUO/4REWW5XRHkw="; + sha256 = "sha256-Ii21kjQ4nWEttvGY9bxhGmfLkI2MrAsYJZcwfE2y6uQ="; leaveDotGit = true; }; @@ -64,7 +64,7 @@ rustPlatform.buildRustPackage { cp ${cargoLock} source/Cargo.lock ''; - cargoSha256 = "sha256-mmKUYOdd+/R5CDhZgtXCi+MGGsmUeNHv7Tzc74p8GwI="; + cargoSha256 = "sha256-BHocUJpk4qplwMfpSXNTZjOpUCZGS676xYrqtSFnP7s="; # `cargo-llvm-cov` reads these environment variables to find these binaries, # which are needed to run the tests