Skip to content

Commit

Permalink
lcov: Support gcc 9
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Feb 28, 2020
1 parent 2e89e0d commit 74c8205
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
19 changes: 17 additions & 2 deletions pkgs/development/tools/analysis/lcov/default.nix
@@ -1,4 +1,4 @@
{stdenv, fetchurl, perl}:
{stdenv, fetchurl, fetchpatch, perl, perlPackages, makeWrapper }:

stdenv.mkDerivation rec {
name = "lcov-1.14";
Expand All @@ -8,13 +8,28 @@ stdenv.mkDerivation rec {
sha256 = "06h7ixyznf6vz1qvksjgy5f3q2nw9akf6zx59npf0h3l32cmd68l";
};

buildInputs = [ perl ];
patches =
[ (fetchpatch {
url = https://github.com/linux-test-project/lcov/commit/ebfeb3e179e450c69c3532f98cd5ea1fbf6ccba7.patch;

This comment has been minimized.

Copy link
@knedlsepp

knedlsepp Mar 2, 2020

Member

The checksum appears to have changed since this commit. How is that even possible when the revision is fixed?

Getting the following locally:

trying https://github.com/linux-test-project/lcov/commit/ebfeb3e179e450c69c3532f98cd5ea1fbf6ccba7.patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 23855  100 23855    0     0  82258      0 --:--:-- --:--:-- --:--:-- 82258
hash mismatch in fixed-output derivation '/nix/store/yh2zywr5scvdq5nn7za3mmwy0f2fzg3s-ebfeb3e179e450c69c3532f98cd5ea1fbf6ccba7.patch':
  wanted: sha256:1z9jfqpj34jnzdvmqr5fs8hl56bvbwd8xhlbg3chcswbjj97vk7l
  got:    sha256:0dalkqbjb6a4vp1lcsxd39dpn5fzdf7ihsjbiviq285s15nxdj1j

This comment has been minimized.

Copy link
@vcunat

vcunat Mar 2, 2020

Member

The hash comitted here is what I get from fetchurl, not after fetchpatch normalization.

This comment has been minimized.

Copy link
@vcunat

vcunat Mar 4, 2020

Member

For reference, fixed by #81631

sha256 = "1z9jfqpj34jnzdvmqr5fs8hl56bvbwd8xhlbg3chcswbjj97vk7l";
})
(fetchpatch {
url = https://github.com/linux-test-project/lcov/commit/75fbae1cfc5027f818a0bb865bf6f96fab3202da.patch;
sha256 = "1wgd4y7vhvfnxyhdd0z2pi9ys6l0z88f14i69a7prb296m1zwg5j";
})
];

buildInputs = [ perl makeWrapper ];

preBuild = ''
patchShebangs bin/
makeFlagsArray=(PREFIX=$out LCOV_PERL_PATH=$(command -v perl))
'';

postInstall = ''
wrapProgram $out/bin/lcov --set PERL5LIB ${perlPackages.makeFullPerlPath [ perlPackages.PerlIOgzip perlPackages.JSON ]}
'';

meta = with stdenv.lib; {
description = "Code coverage tool that enhances GNU gcov";

Expand Down
15 changes: 15 additions & 0 deletions pkgs/top-level/perl-packages.nix
Expand Up @@ -14630,6 +14630,21 @@ let
};
};

PerlIOgzip = buildPerlPackage {
pname = "PerlIO-gzip";
version = "0.20";
src = fetchurl {
url = "mirror://cpan/authors/id/N/NW/NWCLARK/PerlIO-gzip-0.20.tar.gz";
sha256 = "4848679a3f201e3f3b0c5f6f9526e602af52923ffa471a2a3657db786bd3bdc5";
};
buildInputs = [ pkgs.zlib ];
NIX_CFLAGS_LINK = "-L${pkgs.zlib.out}/lib -lz";
meta = {
description = "Perl extension to provide a PerlIO layer to gzip/gunzip";
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
};
};

PerlIOutf8_strict = buildPerlPackage {
pname = "PerlIO-utf8_strict";
version = "0.007";
Expand Down

0 comments on commit 74c8205

Please sign in to comment.