summary refs log tree commit diff
path: root/pkgs/tools/filesystems/gfs2-utils/default.nix
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2021-11-07 09:12:28 +0000
committerSergei Trofimovich <slyich@gmail.com>2021-11-07 09:14:44 +0000
commitae0e800b8921615d3df39526dff0cee4dab5d563 (patch)
treee7a6b7e087ee044b250db905c9766972789f2313 /pkgs/tools/filesystems/gfs2-utils/default.nix
parent83c93c8e1c01425d69bf06b2bf3c0ac5f9282443 (diff)
downloadnixpkgs-ae0e800b8921615d3df39526dff0cee4dab5d563.tar
nixpkgs-ae0e800b8921615d3df39526dff0cee4dab5d563.tar.gz
nixpkgs-ae0e800b8921615d3df39526dff0cee4dab5d563.tar.bz2
nixpkgs-ae0e800b8921615d3df39526dff0cee4dab5d563.tar.lz
nixpkgs-ae0e800b8921615d3df39526dff0cee4dab5d563.tar.xz
nixpkgs-ae0e800b8921615d3df39526dff0cee4dab5d563.tar.zst
nixpkgs-ae0e800b8921615d3df39526dff0cee4dab5d563.zip
gfs2-utils: pull pending upstream inclusion fix for ncurses-6.3
Without the fix build on ncurses-6.3 fails as:

        hexedit.c:227:9: error: format not a string literal and no format arguments [-Werror=format-security]
          227 |         printw(s2);
              |         ^~~~~~
Diffstat (limited to 'pkgs/tools/filesystems/gfs2-utils/default.nix')
-rw-r--r--pkgs/tools/filesystems/gfs2-utils/default.nix16
1 files changed, 15 insertions, 1 deletions
diff --git a/pkgs/tools/filesystems/gfs2-utils/default.nix b/pkgs/tools/filesystems/gfs2-utils/default.nix
index ba479b87aa9..3f68888776c 100644
--- a/pkgs/tools/filesystems/gfs2-utils/default.nix
+++ b/pkgs/tools/filesystems/gfs2-utils/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl
+{ lib, stdenv, fetchurl, fetchpatch
 , autoreconfHook, bison, flex, pkg-config
 , bzip2, check, ncurses, util-linux, zlib
 }:
@@ -12,6 +12,20 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-gwKxBBG5PtG4/RxX4sUC25ZeG8K2urqVkFDKL7NS4ZI=";
   };
 
+  patches = [
+    # pull pending upstream inclusion fix for ncurses-6.3: sent upstream over email.
+    (fetchpatch {
+      name = "ncurses-6.3.patch";
+      url = "https://pagure.io/fork/slyfox/gfs2-utils/c/c927b635f380cca77665195a3aaae804d92870a4.patch";
+      sha256 = "sha256-0M1xAqRXoUi2el03WODF/nqEe9JEE5GehMWs776QZNI=";
+    })
+  ];
+  postPatch = ''
+    # Apply fix for ncurses-6.3. Upstream development branch already reworked the code.
+    # To be removed on next reelase.
+    substituteInPlace gfs2/edit/gfs2hex.c --replace 'printw(title);' 'printw("%s",title);'
+  '';
+
   outputs = [ "bin" "doc" "out" "man" ];
 
   nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];