From 7331816f56680397a0c294b5d5b8809e82c0752c Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 18 Nov 2021 08:18:23 +0000 Subject: [PATCH 1/2] nfstrace: pull pending upstream inclusion fix for ncurses-6.3 Without the fix build on ncurses-6.3 fails as: nfstrace/analyzers/src/watch/nc_windows/header_window.cpp:77:82: error: format '%d' expects argument of type 'int', but argument 5 has type 'time_t' {aka 'long int'} [-Werror=format=] 77 | mvwprintw(_window, HEADER::ELAPSED_LINE, FIRST_CHAR_POS, "Elapsed time: \t %d days; %d:%d:%d times", | ~^ | int | %ld While at it wropped blnket -Werror that fails on gcc-12 and clang-12. --- pkgs/tools/networking/nfstrace/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/tools/networking/nfstrace/default.nix b/pkgs/tools/networking/nfstrace/default.nix index ca75e50fa527..ac9af8e9816c 100644 --- a/pkgs/tools/networking/nfstrace/default.nix +++ b/pkgs/tools/networking/nfstrace/default.nix @@ -22,11 +22,22 @@ stdenv.mkDerivation rec { url = "https://github.com/epam/nfstrace/commit/4562a895ed3ac0e811bdd489068ad3ebe4d7b501.patch"; sha256 = "1fbicbllyykjknik7asa81x0ixxmbwqwkiz74cnznagv10jlkj3p"; }) + + # Fix pending upstream inclusion for ncurses-6.3 support: + # https://github.com/epam/nfstrace/pull/50 + (fetchpatch { + name = "ncurses-6.3.patch"; + url = "https://github.com/epam/nfstrace/commit/29c7c415f5412df1aae9b1e6ed3a2760d2c227a0.patch"; + sha256 = "134709w6bld010jx3xdy9imcjzal904a84n9f8vv0wnas5clxdmx"; + }) ]; postPatch = '' substituteInPlace CMakeLists.txt \ --replace "-Wno-braced-scalar-init" "" + # -Wall -Wextra -Werror fails on clang and newer gcc + substituteInPlace CMakeLists.txt \ + --replace "-Werror" "" ''; buildInputs = [ json_c libpcap ncurses libtirpc ]; From 568e4f57cee2cef45230224efd0869e999f515df Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 30 Nov 2021 19:31:55 +0000 Subject: [PATCH 2/2] Update pkgs/tools/networking/nfstrace/default.nix Co-authored-by: Sandro --- pkgs/tools/networking/nfstrace/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/nfstrace/default.nix b/pkgs/tools/networking/nfstrace/default.nix index ac9af8e9816c..7e2b938e4c8b 100644 --- a/pkgs/tools/networking/nfstrace/default.nix +++ b/pkgs/tools/networking/nfstrace/default.nix @@ -33,10 +33,9 @@ stdenv.mkDerivation rec { ]; postPatch = '' + # -Wall -Wextra -Werror fails on clang and newer gcc substituteInPlace CMakeLists.txt \ - --replace "-Wno-braced-scalar-init" "" - # -Wall -Wextra -Werror fails on clang and newer gcc - substituteInPlace CMakeLists.txt \ + --replace "-Wno-braced-scalar-init" "" \ --replace "-Werror" "" '';