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

On ncurses-6.3 with extra printf() annotations gcc now detects use of user input in place of format strings: lib/renderers/curses/curses.c:234:9: error: format not a string literal and no format arguments [-Werror=format-security] 234 | mvprintw(0, 0, menu->title); | ^~~~~~~~

commite8815af10e6477bfcba9bd3cfc4494bd43090cbf authorSergei Trofimovich <slyich@gmail.com> dateTue 2 Nov 2021, 23:50 (5 years ago) parent4ce91f3
1 file changed+10−1
pkgs/applications/misc/bemenu/default.nix+10−1
pkgs/applications/misc/bemenu/default.nix+10−1
@@ -1,4 +1,4 @@
1−{ stdenv, lib, fetchFromGitHub, cairo, libxkbcommon
1+{ stdenv, lib, fetchFromGitHub, fetchpatch, cairo, libxkbcommon
22, pango, fribidi, harfbuzz, pcre, pkg-config
33, ncursesSupport ? true, ncurses ? null
44, waylandSupport ? true, wayland ? null, wayland-protocols ? null
@@ -20,6 +20,15 @@ stdenv.mkDerivation rec {
2020 sha256 = "sha256-U4IMfDvQ0rfEJhE3Uext2c/Cs0mjy1tw+k8uk441Ag8=";
2121 };
2222
23+ patches = [
24+ # Pull upstream fix for build against ncurses-6.3
25+ (fetchpatch {
26+ name = "ncurses-6.3.patch";
27+ url = "https://github.com/Cloudef/bemenu/commit/d31164db756989579468946aba62969e42c7ed28.patch";
28+ sha256 = "sha256-oyndQI7SaR8cK0IO5wIIxMpmakhfUzwUqLIKRbPkEdw=";
29+ })
30+ ];
31+
2332 nativeBuildInputs = [ pkg-config pcre ];
2433
2534 makeFlags = ["PREFIX=$(out)"];