summary refs log tree commit diff
path: root/pkgs/os-specific/linux/sysdig
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2021-12-04 19:33:40 +0000
committerSergei Trofimovich <slyich@gmail.com>2021-12-04 19:34:21 +0000
commit134db1c397873fb57864ebb9ae45bc55b19b9a0e (patch)
treec07a3fde87a9dbcafe292f8e1f2271b8c1db74d5 /pkgs/os-specific/linux/sysdig
parente0c74a4d1fcdfd5d439322e95bdcf3b0a7b3812a (diff)
downloadnixpkgs-134db1c397873fb57864ebb9ae45bc55b19b9a0e.tar
nixpkgs-134db1c397873fb57864ebb9ae45bc55b19b9a0e.tar.gz
nixpkgs-134db1c397873fb57864ebb9ae45bc55b19b9a0e.tar.bz2
nixpkgs-134db1c397873fb57864ebb9ae45bc55b19b9a0e.tar.lz
nixpkgs-134db1c397873fb57864ebb9ae45bc55b19b9a0e.tar.xz
nixpkgs-134db1c397873fb57864ebb9ae45bc55b19b9a0e.tar.zst
nixpkgs-134db1c397873fb57864ebb9ae45bc55b19b9a0e.zip
sysdig: fix pending upstream inclusion for ncurses-6.3
Without the change the build fails as:

    sysdig/userspace/sinspui/cursescomponents.cpp: In member function 'void curses_textbox::print_no_data()':
    sysdig/userspace/sinspui/cursescomponents.cpp:878:15: error: format not a string literal and no format arguments [-Werror=format-security]
      878 |   wstr.c_str());
          |               ^
Diffstat (limited to 'pkgs/os-specific/linux/sysdig')
-rw-r--r--pkgs/os-specific/linux/sysdig/default.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix
index 564fbca37ba..2c51e8c36d8 100644
--- a/pkgs/os-specific/linux/sysdig/default.nix
+++ b/pkgs/os-specific/linux/sysdig/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, cmake, kernel, installShellFiles
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, kernel, installShellFiles
 , luajit, ncurses, perl, jsoncpp, libb64, openssl, curl, jq, gcc, elfutils, tbb, protobuf, grpc
 }:
 
@@ -14,6 +14,19 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-lYjMvxMIReANNwMr62u881Nugrs9piOaN3EmrvGzRns=";
   };
 
+  patches = [
+    # Fix pending upstream inclusion for ncurses-6.3 support:
+    #  https://github.com/draios/sysdig/pull/1810
+    (fetchpatch {
+      name = "ncurses-6.3.patch";
+      url = "https://github.com/draios/sysdig/commit/1e37fffe0337b8f8f8e0b5345db2f8631851c209.patch";
+      sha256 = "sha256-T+yC6iXQ3MY+ub0c+Hv+cC18PV8YlAOKB6YB1Hdm7Yc=";
+      # change 'a/userspace/sinspui' for 'a/userspace/libsinsp' to follow upstream rename.
+      stripLen = 3;
+      extraPrefix = "userspace/libsinsp/";
+    })
+  ];
+
   nativeBuildInputs = [ cmake perl installShellFiles ];
   buildInputs = [
     luajit ncurses jsoncpp libb64 openssl curl jq gcc elfutils tbb protobuf grpc