about summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
authorStig <stig@stig.io>2024-06-24 16:59:44 +0200
committerGitHub <noreply@github.com>2024-06-24 16:59:44 +0200
commitb4a237a1b79ef60236afef7b85d78118f3874d1d (patch)
tree26381cd09638c3b06afec6502061d8d686474160 /pkgs/development/tools
parent8ff3bf9e4dd67c1b4a6bec9dede5f4b9f039b876 (diff)
parentf756ee76674e2afb569c5159fee784eb4d1fa7a7 (diff)
Merge pull request #322052 from wegank/lcov-bump
lcov: 1.16 -> 2.1
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/analysis/lcov/default.nix61
1 files changed, 43 insertions, 18 deletions
diff --git a/pkgs/development/tools/analysis/lcov/default.nix b/pkgs/development/tools/analysis/lcov/default.nix
index 349b44730b8a2..c5e3b43eea061 100644
--- a/pkgs/development/tools/analysis/lcov/default.nix
+++ b/pkgs/development/tools/analysis/lcov/default.nix
@@ -1,18 +1,42 @@
- {lib, stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper }:
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  perl,
+  python3,
+  perlPackages,
+  makeWrapper,
+}:
 
+let
+  perlDeps = [
+    perlPackages.CaptureTiny
+    perlPackages.DateTime
+    perlPackages.DateTimeFormatW3CDTF
+    perlPackages.DevelCover
+    perlPackages.GD
+    perlPackages.JSONXS
+    perlPackages.MemoryProcess
+    perlPackages.PathTools
+  ];
+in
 stdenv.mkDerivation rec {
   pname = "lcov";
-  version = "1.16";
+  version = "2.1";
 
   src = fetchFromGitHub {
     owner = "linux-test-project";
     repo = "lcov";
     rev = "v${version}";
-    sha256 = "sha256-X1T5OqR6NgTNGedH1on3+XZ7369007By6tRJK8xtmbk=";
+    hash = "sha256-QfA+mzLfpi2fuhcPvCKO7YnPef1GMhCbgBWdXFTXPzE=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
-  buildInputs = [ perl ];
+
+  buildInputs = [
+    perl
+    python3
+  ];
 
   preBuild = ''
     patchShebangs bin/
@@ -20,26 +44,27 @@ stdenv.mkDerivation rec {
   '';
 
   postInstall = ''
-    wrapProgram $out/bin/lcov --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.PerlIOgzip perlPackages.JSON ]}
-    wrapProgram $out/bin/genpng --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.GD ]}
+    for f in "$out"/bin/{gen*,lcov,perl2lcov}; do
+      wrapProgram "$f" --set PERL5LIB ${perlPackages.makeFullPerlPath perlDeps}
+    done
   '';
 
-  meta = with lib; {
+  meta = {
     description = "Code coverage tool that enhances GNU gcov";
 
-    longDescription =
-      '' LCOV is an extension of GCOV, a GNU tool which provides information
-         about what parts of a program are actually executed (i.e.,
-         "covered") while running a particular test case.  The extension
-         consists of a set of PERL scripts which build on the textual GCOV
-         output to implement the following enhanced functionality such as
-         HTML output.
-      '';
+    longDescription = ''
+      LCOV is an extension of GCOV, a GNU tool which provides information
+      about what parts of a program are actually executed (i.e.,
+      "covered") while running a particular test case.  The extension
+      consists of a set of PERL scripts which build on the textual GCOV
+      output to implement the following enhanced functionality such as
+      HTML output.
+    '';
 
-    homepage = "https://ltp.sourceforge.net/coverage/lcov.php";
+    homepage = "https://github.com/linux-test-project/lcov";
     license = lib.licenses.gpl2Plus;
 
-    maintainers = with maintainers; [ dezgeg ];
-    platforms = platforms.all;
+    maintainers = with lib.maintainers; [ dezgeg ];
+    platforms = lib.platforms.all;
   };
 }