git.iko.soy/typeable/nixpkgs
on master help sign in
libviper: fix build against ncurses-6.3

Without the change the build on upcoming `ncurses-6.3` fails as: w_decorate.c:45:17: error: format not a string literal and no format arguments [-Werror=format-security] 45 | mvwprintw(window,0,x,title); | ^~~~~~~~~

commit54765edc0bc6e349d52d46e7d52ee98e02c161d1 authorSergei Trofimovich <slyich@gmail.com> dateSun 28 Nov 2021, 16:14 (5 years ago) parent78cb77b
1 file changed+11−1
pkgs/development/libraries/libviper/default.nix+11−1
pkgs/development/libraries/libviper/default.nix+11−1
@@ -7,8 +7,18 @@ stdenv.mkDerivation rec {
77 sha256 = "1jvm7wdgw6ixyhl0pcfr9lnr9g6sg6whyrs9ihjiz0agvqrgvxwc";
88 };
99
10− patchPhase = ''
10+ postPatch = ''
1111 sed -i -e s@/usr/local@$out@ -e /ldconfig/d -e '/cd vdk/d' Makefile
12+
13+ # Fix pending upstream inclusion for ncurses-6.3 support:
14+ # https://github.com/TragicWarrior/libviper/pull/16
15+ # Not applied as it due to unrelated code changes in context.
16+ substituteInPlace viper_msgbox.c --replace \
17+ 'mvwprintw(window,height-3,tmp,prompt);' \
18+ 'mvwprintw(window,height-3,tmp,"%s",prompt);'
19+ substituteInPlace w_decorate.c --replace \
20+ 'mvwprintw(window,0,x,title);' \
21+ 'mvwprintw(window,0,x,"%s",title);'
1222 '';
1323
1424 preInstall = ''