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

Without the change the build on upcoming `ncurses-6.3` fails as: vwm_bkgd.c:71:63: error: format not a string literal and no format arguments [-Werror=format-security] 71 | mvwprintw(window,height-1,width-(strlen(version_str)),version_str); | ^~~~~~~~~~~

commit3f3dd1d0c9072f3a32a4c4ff1fafdf4e3724b4ff authorSergei Trofimovich <slyich@gmail.com> dateSun 28 Nov 2021, 16:21 (5 years ago) parent78cb77b
1 file changed+6−1
pkgs/applications/window-managers/vwm/default.nix+6−1
pkgs/applications/window-managers/vwm/default.nix+6−1
@@ -19,11 +19,16 @@ stdenv.mkDerivation rec {
1919 sha256 = "1r5wiqyfqwnyx7dfihixlnavbvg8rni36i4gq169aisjcg7laxaf";
2020 };
2121
22− prePatch = ''
22+ postPatch = ''
2323 sed -i -e s@/usr/local@$out@ \
2424 -e s@/usr/lib@$out/lib@ \
2525 -e 's@tic vwmterm@tic -o '$out/lib/terminfo' vwmterm@' \
2626 -e /ldconfig/d Makefile modules/*/Makefile vwm.h
27+
28+ # Fix ncurses-6.3 support:
29+ substituteInPlace vwm_bkgd.c --replace \
30+ 'mvwprintw(window,height-1,width-(strlen(version_str)),version_str);' \
31+ 'mvwprintw(window,height-1,width-(strlen(version_str)),"%s", version_str);'
2732 '';
2833
2934 preInstall = ''