about summary refs log tree commit diff
path: root/pkgs/applications/audio/ecasound
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2021-11-05 23:32:12 +0000
committerSergei Trofimovich <slyich@gmail.com>2021-11-05 23:34:36 +0000
commit220c819f5306e019b9a12984b5f084694b134e96 (patch)
treef87fc6c1f1d50641e5165576310f82b6cf65b475 /pkgs/applications/audio/ecasound
parentd2c613620d7676d51a030edbc67cc39683a7867b (diff)
ecasound: 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:

  ecasignalview.cpp:360:13:
    error: format not a string literal and no format arguments [-Werror=format-security]
    360 | mvprintw(r++, 0, bar);
        | ~~~~~~~~^~~~~~~~~~~~~
Diffstat (limited to 'pkgs/applications/audio/ecasound')
-rw-r--r--pkgs/applications/audio/ecasound/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/applications/audio/ecasound/default.nix b/pkgs/applications/audio/ecasound/default.nix
index 47db220164859..108be8726c50e 100644
--- a/pkgs/applications/audio/ecasound/default.nix
+++ b/pkgs/applications/audio/ecasound/default.nix
@@ -1,5 +1,6 @@
 { lib, stdenv
 , fetchurl
+, fetchpatch
 , pkg-config
 , alsa-lib
 , audiofile
@@ -28,6 +29,16 @@ stdenv.mkDerivation rec {
     sha256 = "1m7njfjdb7sqf0lhgc4swihgdr4snkg8v02wcly08wb5ar2fr2s6";
   };
 
+  patches = [
+    # Pull patch pending upstream inclusion for ncurses-6.3:
+    #  https://sourceforge.net/p/ecasound/bugs/54/
+    (fetchpatch {
+      name = "ncursdes-6.3.patch";
+      url = "https://sourceforge.net/p/ecasound/bugs/54/attachment/0001-ecasignalview.cpp-always-use-s-style-format-for-prin.patch";
+      sha256 = "1x1gsjzd43lh19mhpmwrbq269h56s8bxgyv0yfi5yf0sqjf9vaq0";
+    })
+  ];
+
   nativeBuildInputs = [
     pkg-config
   ];