about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--maintainers/maintainer-list.nix6
-rw-r--r--pkgs/development/tools/misc/grcov/default.nix38
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 46 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 965b7624c959c..6ec7d705ef2e4 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -2993,6 +2993,12 @@
     githubId = 8404455;
     name = "Diego Lelis";
   };
+  DieracDelta = {
+    email = "justin@restivo.me";
+    github = "DieracDelta";
+    githubId = 13730968;
+    name = "Justin Restivo";
+  };
   diffumist = {
     email = "git@diffumist.me";
     github = "diffumist";
diff --git a/pkgs/development/tools/misc/grcov/default.nix b/pkgs/development/tools/misc/grcov/default.nix
new file mode 100644
index 0000000000000..45e1ba8e4bc06
--- /dev/null
+++ b/pkgs/development/tools/misc/grcov/default.nix
@@ -0,0 +1,38 @@
+{ lib, rustPlatform, fetchFromGitHub }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "grcov";
+  version = "0.8.7";
+
+  src = fetchFromGitHub {
+    owner = "mozilla";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-4McF9tLIjDCftyGI29pm/LnTUBVWG+pY5z+mGFKySQM=";
+  };
+
+  cargoSha256 = "sha256-/filuQ4AWsKVIsXbDX7S1yhCArLNTZpOMEn3ID6WuMo=";
+
+  # tests do not find grcov path correctly
+  checkFlags = let
+    skipList = [
+      "test_coveralls_service_job_id_is_not_sufficient"
+      "test_coveralls_service_name_is_not_sufficient"
+      "test_coveralls_works_with_just_service_name_and_job_id_args"
+      "test_coveralls_works_with_just_token_arg"
+      "test_integration"
+      "test_integration_guess_single_file"
+      "test_integration_zip_dir"
+      "test_integration_zip_zip"
+    ];
+    skipFlag = test: "--skip " + test;
+  in builtins.concatStringsSep " " (builtins.map skipFlag skipList);
+
+  meta = with lib; {
+    description =
+      "Rust tool to collect and aggregate code coverage data for multiple source files";
+    homepage = "https://github.com/mozilla/grcov";
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ DieracDelta ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f360f8f31b5aa..6c49c8cbc5f8d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -15017,6 +15017,8 @@ with pkgs;
   gradle_7 = callPackage gradle-packages.gradle_7 { };
   gradle = gradle_7;
 
+  grcov = callPackage ../development/tools/misc/grcov { };
+
   gperf = callPackage ../development/tools/misc/gperf { };
   # 3.1 changed some parameters from int to size_t, leading to mismatches.
   gperf_3_0 = callPackage ../development/tools/misc/gperf/3.0.x.nix { };