File tree Expand file tree Collapse file tree
pkgs/os-specific/linux/opensnitch-ebpf Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 bc ,
1111 opensnitch ,
1212 nixosTests ,
13+ fetchpatch2 ,
1314} :
1415
1516stdenv . mkDerivation rec {
@@ -18,6 +19,17 @@ stdenv.mkDerivation rec {
1819
1920 inherit ( opensnitch ) src ;
2021
22+ patches = [
23+ ( fetchpatch2 {
24+ # fixes build failures on kernel >= 6.19 (#490127)
25+ # remove when added to a release
26+ name = "fix-kernel-6.19-build.patch" ;
27+ stripLen = 1 ;
28+ url = "https://github.com/evilsocket/opensnitch/commit/614537c92ec82f54f76a45fb406ad2fb6e6fa618.patch?full_index=1" ;
29+ hash = "sha256-FCJfDhgmnm1GXPDaxr+YpVWTRrwBvjVzvGdZSFB6SqQ=" ;
30+ } )
31+ ] ;
32+
2133 sourceRoot = "${ src . name } /ebpf_prog" ;
2234
2335 nativeBuildInputs = with llvmPackages ; [
@@ -35,6 +47,7 @@ stdenv.mkDerivation rec {
3547 # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=opensnitch-ebpf-module&id=984b952a784eb701f691dd9f2d45dfeb8d15053b
3648 env . NIX_CFLAGS_COMPILE = "-fno-stack-protector" ;
3749
50+ env . KERNEL_VER = kernel . modDirVersion ;
3851 env . KERNEL_DIR = "${ kernel . dev } /lib/modules/${ kernel . modDirVersion } /source" ;
3952 env . KERNEL_HEADERS = "${ kernel . dev } /lib/modules/${ kernel . modDirVersion } /build" ;
4053
You can’t perform that action at this time.
0 commit comments