git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #147725 from trofi/fix-liboping-for-ncurses-6.3
commitb1c48fd35087257c18f3c3ad36a36e0a94985bab authorSandro <sandro.jaeckel@gmail.com> dateMon 29 Nov 2021, 20:22 (5 years ago) parent118e023387b85d
2 files changed+27
pkgs/development/libraries/liboping/default.nix+6 pkgs/development/libraries/liboping/ncurses-6.3.patch+21
pkgs/development/libraries/liboping/default.nix+6
@@ -9,6 +9,12 @@ stdenv.mkDerivation rec {
99 sha256 = "1n2wkmvw6n80ybdwkjq8ka43z2x8mvxq49byv61b52iyz69slf7b";
1010 };
1111
12+ patches = [
13+ # Add support for ncurses-6.3. A backport of patch pending upstream
14+ # inclusion: https://github.com/octo/liboping/pull/61
15+ ./ncurses-6.3.patch
16+ ];
17+
1218 NIX_CFLAGS_COMPILE = lib.optionalString
1319 stdenv.cc.isGNU "-Wno-error=format-truncation";
1420
pkgs/development/libraries/liboping/ncurses-6.3.patchnew file+21
@@ -0,0 +1,21 @@
1+A backport of https://github.com/octo/liboping/pull/61
2+--- a/src/oping.c
3++++ b/src/oping.c
4+@@ -1125,7 +1125,7 @@ static int update_graph_prettyping (ping_context_t *ctx, /* {{{ */
5+ wattron (ctx->window, COLOR_PAIR(color));
6+
7+ if (has_utf8())
8+- mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, symbol);
9++ mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, "%s", symbol);
10+ else
11+ mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, symbolc);
12+
13+@@ -1222,7 +1222,7 @@ static int update_graph_histogram (ping_context_t *ctx) /* {{{ */
14+ if (counters[x] == 0)
15+ mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, ' ');
16+ else if (has_utf8 ())
17+- mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2,
18++ mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, "%s",
19+ hist_symbols_utf8[index]);
20+ else
21+ mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2,