@@ -0,0 +1,38 @@
1+{ lib, rustPlatform, fetchFromGitHub }:
2+
3+rustPlatform.buildRustPackage rec {
4+ pname = "grcov";
5+ version = "0.8.7";
6+
7+ src = fetchFromGitHub {
8+ owner = "mozilla";
9+ repo = pname;
10+ rev = "v${version}";
11+ sha256 = "sha256-4McF9tLIjDCftyGI29pm/LnTUBVWG+pY5z+mGFKySQM=";
12+ };
13+
14+ cargoSha256 = "sha256-/filuQ4AWsKVIsXbDX7S1yhCArLNTZpOMEn3ID6WuMo=";
15+
16+ # tests do not find grcov path correctly
17+ checkFlags = let
18+ skipList = [
19+ "test_coveralls_service_job_id_is_not_sufficient"
20+ "test_coveralls_service_name_is_not_sufficient"
21+ "test_coveralls_works_with_just_service_name_and_job_id_args"
22+ "test_coveralls_works_with_just_token_arg"
23+ "test_integration"
24+ "test_integration_guess_single_file"
25+ "test_integration_zip_dir"
26+ "test_integration_zip_zip"
27+ ];
28+ skipFlag = test: "--skip " + test;
29+ in builtins.concatStringsSep " " (builtins.map skipFlag skipList);
30+
31+ meta = with lib; {
32+ description =
33+ "Rust tool to collect and aggregate code coverage data for multiple source files";
34+ homepage = "https://github.com/mozilla/grcov";
35+ license = licenses.mpl20;
36+ maintainers = with maintainers; [ DieracDelta ];
37+ };
38+}