From be0b3e3cd0d784333c151d1c7cc7e45b6af189ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Fri, 27 Apr 2018 22:22:26 +0200 Subject: [PATCH 1/2] kcov: 34 -> 35 As the maintainer currently in `meta.maintainers` appears to not have touched the package since 2015, I've also added myself there. --- pkgs/development/tools/analysis/kcov/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/analysis/kcov/default.nix b/pkgs/development/tools/analysis/kcov/default.nix index 3c3665e72200..ce391b938cae 100644 --- a/pkgs/development/tools/analysis/kcov/default.nix +++ b/pkgs/development/tools/analysis/kcov/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "kcov-${version}"; - version = "34"; + version = "35"; src = fetchFromGitHub { owner = "SimonKagstrom"; repo = "kcov"; rev = "v${version}"; - sha256 = "1i4pn5na8m308pssk8585nmqi8kwd63a9h2rkjrn4w78ibmxvj01"; + sha256 = "1da9vm87pi5m9ika0q1f1ai85w3vwlap8yln147yr9sc37jp5jcw"; }; preConfigure = "patchShebangs src/bin-to-c-source.py"; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { homepage = http://simonkagstrom.github.io/kcov/index.html; license = licenses.gpl2; - maintainers = [ maintainers.gal_bolle ]; + maintainers = with maintainers; [ gal_bolle ekleog ]; platforms = platforms.linux; }; } From 4317f7ab26942b4fad23f616932a1df1611bd44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Fri, 27 Apr 2018 23:52:50 +0200 Subject: [PATCH 2/2] kcov: fix build on aarch64 Apparently, without this patch `NT_PRSTATUS` is not found. So the patch adds the include apparently necessary. `NT_PRSTATUS` is also defined in ``, which would likely have been a better name, were it not in the `linux/` directory, which is a priori not stable. The need to do that is kind of weird (the change was introduced in [1], and fedora apparently didn't need this additional import), but I'll try to upstream it. [1] https://github.com/SimonKagstrom/kcov/pull/239 --- .../tools/analysis/kcov/aarch64_nt_prstatus.patch | 12 ++++++++++++ pkgs/development/tools/analysis/kcov/default.nix | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 pkgs/development/tools/analysis/kcov/aarch64_nt_prstatus.patch diff --git a/pkgs/development/tools/analysis/kcov/aarch64_nt_prstatus.patch b/pkgs/development/tools/analysis/kcov/aarch64_nt_prstatus.patch new file mode 100644 index 000000000000..d5c3662e9abf --- /dev/null +++ b/pkgs/development/tools/analysis/kcov/aarch64_nt_prstatus.patch @@ -0,0 +1,12 @@ +diff --git a/src/engines/ptrace.cc b/src/engines/ptrace.cc +index 59b615f..e02cddf 100644 +--- a/src/engines/ptrace.cc ++++ b/src/engines/ptrace.cc +@@ -21,6 +21,7 @@ + + #if defined(__aarch64__) + # include ++# include + #endif + + #include diff --git a/pkgs/development/tools/analysis/kcov/default.nix b/pkgs/development/tools/analysis/kcov/default.nix index ce391b938cae..7d75d9a34e1a 100644 --- a/pkgs/development/tools/analysis/kcov/default.nix +++ b/pkgs/development/tools/analysis/kcov/default.nix @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { buildInputs = [ zlib curl elfutils python libiberty libopcodes ]; + patches = [ ./aarch64_nt_prstatus.patch ]; + enableParallelBuilding = true; meta = with stdenv.lib; {