summary refs log tree commit diff
path: root/pkgs/applications/editors/aewan
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2021-11-02 08:49:30 +0000
committerSergei Trofimovich <slyich@gmail.com>2021-11-02 08:51:40 +0000
commit429e07efe5977f0d2cee0ecc2d4169e24caa3219 (patch)
tree33cb5faaee26b402438468c95da3af0c14501ea4 /pkgs/applications/editors/aewan
parentb6b71e8b044bd038cc0b314feedc344b1fb8f1ee (diff)
aewan: fix build against ncurses-6.3
`ncuses-6.3` added printf-style function attributes and now makes
it easier to catch cases when user input is used in palce of format
string when built with CFLAGS=-Werror=format-security:

    aewan.c: In function 'paint_screen':
    aewan.c:147:7: error: format not a string literal and no format arguments [-Werror=format-security]
      147 |       printw(msg);
          |       ^~~~~~

Let's pull a patch pending upstream inclusion.
Diffstat (limited to 'pkgs/applications/editors/aewan')
-rw-r--r--pkgs/applications/editors/aewan/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/applications/editors/aewan/default.nix b/pkgs/applications/editors/aewan/default.nix
index b9d350cbd438d..8472a91c596fe 100644
--- a/pkgs/applications/editors/aewan/default.nix
+++ b/pkgs/applications/editors/aewan/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, zlib, ncurses }:
+{ lib, stdenv, fetchurl, fetchpatch, zlib, ncurses }:
 
 stdenv.mkDerivation rec {
   pname = "aewan";
@@ -9,6 +9,17 @@ stdenv.mkDerivation rec {
     sha256 = "5266dec5e185e530b792522821c97dfa5f9e3892d0dca5e881d0c30ceac21817";
   };
 
+  patches = [
+    # Pull patch pending upstream inclusion:
+    #  https://sourceforge.net/p/aewan/bugs/13/
+    (fetchpatch {
+      url = "https://sourceforge.net/p/aewan/bugs/13/attachment/aewan-cvs-ncurses-6.3.patch";
+      sha256 = "0pgpk1l3d6d5y37lvvavipwnmv9gmpfdy21jkz6baxhlkgf43r4p";
+      # patch is in CVS diff format, add 'a/' prefix
+      extraPrefix = "";
+    })
+  ];
+
   buildInputs = [ zlib ncurses ];
 
   meta = {