diff options
author | Jeremy Fleischman <jeremyfleischman@gmail.com> | 2023-02-22 19:43:02 -0800 |
---|---|---|
committer | Jeremy Fleischman <jeremyfleischman@gmail.com> | 2023-02-22 19:43:02 -0800 |
commit | bb724fa986f6be4663f0cf15949bbb8de5814ff1 (patch) | |
tree | 63f3017d9896837a9e948322568ea51f2a48bc7e /pkgs/os-specific/linux/sysdig | |
parent | 988cc958c57ce4350ec248d2d53087777f9e1949 (diff) | |
download | nixpkgs-bb724fa986f6be4663f0cf15949bbb8de5814ff1.tar nixpkgs-bb724fa986f6be4663f0cf15949bbb8de5814ff1.tar.gz nixpkgs-bb724fa986f6be4663f0cf15949bbb8de5814ff1.tar.bz2 nixpkgs-bb724fa986f6be4663f0cf15949bbb8de5814ff1.tar.lz nixpkgs-bb724fa986f6be4663f0cf15949bbb8de5814ff1.tar.xz nixpkgs-bb724fa986f6be4663f0cf15949bbb8de5814ff1.tar.zst nixpkgs-bb724fa986f6be4663f0cf15949bbb8de5814ff1.zip |
sysdig: Include driver patch to fix compilation on Linux 6.2
On nixos-unstable with the latest kernel (6.2.0), I'm seeing sysdig fail to compile: /build/source/build/driver/src/main.c:2788:30: error: assignment to 'char * (*)(const struct device *, umode_t *)' {aka 'char * (*)(const struct device *, short unsigned int *)'} from incompatible pointer type 'char * (*)(struct device *, umode_t *)' {aka 'char * (*)(struct device *, short unsigned int *)'} [-Werror=incompatible-pointer-types] 2788 | g_ppm_class->devnode = ppm_devnode; | ^ /build/libs/userspace/libscap/scap_procs.c: In function 'scap_os_getpid_global': This has already been fixed upstream, this just cherry-picks that fix.
Diffstat (limited to 'pkgs/os-specific/linux/sysdig')
-rw-r--r-- | pkgs/os-specific/linux/sysdig/default.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index a8579a50fb6..2e01a38a069 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -22,6 +22,11 @@ let rev = "3.0.1+driver"; sha256 = "sha256-bK9wv17bVl93rOqw7JICnMOM0fDtPIErfMmUmNKOD5c="; }; + # Workaround for scap-driver compilation error on kernel 6.2: https://github.com/falcosecurity/libs/issues/918 + driverPatch = fetchpatch { + url = "https://github.com/falcosecurity/libs/commit/b8ec3e8637c850066d01543616fe413e8deb9e1f.patch"; + hash = "sha256-s7iHbOjVqHSWRY4gktZldgrU5OClqRmbqmDtUgFIeh0="; + }; in stdenv.mkDerivation rec { @@ -67,6 +72,7 @@ stdenv.mkDerivation rec { chmod -R +w libs cp -r ${driver} driver-src chmod -R +w driver-src + patch -p1 -d driver-src < ${driverPatch} cmakeFlagsArray+=( "-DFALCOSECURITY_LIBS_SOURCE_DIR=$(pwd)/libs" "-DVALIJSON_INCLUDE=${valijson}/include" |