sysdig: 0.33.1 -> 0.34.1

authored by Jörg Thalheim and committed by Jörg Thalheim 41becba8 5fd45b86

+42 -22
+42 -22
pkgs/os-specific/linux/sysdig/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, fetchpatch, cmake, kernel, installShellFiles, pkg-config 2 - , luajit, ncurses, perl, jsoncpp, libb64, openssl, curl, jq, gcc, elfutils, tbb, protobuf, grpc 3 - , yaml-cpp, nlohmann_json, re2, zstd 4 }: 5 6 let 7 # Compare with https://github.com/draios/sysdig/blob/dev/cmake/modules/falcosecurity-libs.cmake 8 - libsRev = "59fb313475b82f842e9e9bbc1e0e629428c0a4cf"; 9 - libsSha256 = "sha256-IjzLbCOpB6EgPDgkGIyg1dNxHfYgU10OLgXrDOPmoTs="; 10 11 # Compare with https://github.com/falcosecurity/libs/blob/master/cmake/modules/valijson.cmake#L17 12 valijson = fetchFromGitHub { 13 owner = "tristanpenman"; 14 repo = "valijson"; 15 rev = "v0.6"; 16 - sha256 = "sha256-ZD19Q2MxMQd3yEKbY90GFCrerie5/jzgO8do4JQDoKM="; 17 }; 18 19 # https://github.com/draios/sysdig/blob/0.31.5/cmake/modules/driver.cmake 20 driver = fetchFromGitHub { 21 owner = "falcosecurity"; 22 repo = "libs"; 23 - rev = libsRev; 24 - sha256 = libsSha256; 25 }; 26 27 in 28 stdenv.mkDerivation rec { 29 pname = "sysdig"; 30 - version = "0.33.1"; 31 32 src = fetchFromGitHub { 33 owner = "draios"; 34 repo = "sysdig"; 35 rev = version; 36 - sha256 = "sha256-qcJ9EcePrsKic+wgsck+pTrRdQic0xhzguH4EYVP0gk="; 37 }; 38 39 - patches = [ 40 - # https://github.com/draios/sysdig/pull/2024 41 - (fetchpatch { 42 - url = "https://github.com/draios/sysdig/commit/d9515aad2be660b2ba7ec8c0b4fb2467a10434af.patch"; 43 - sha256 = "sha256-3m+Rn8BZS8U8QTBDJ6x7kQbH6BE3HKgt1iNnRjPEr8k="; 44 - }) 45 - ]; 46 - 47 nativeBuildInputs = [ cmake perl installShellFiles pkg-config ]; 48 buildInputs = [ 49 luajit 50 ncurses 51 - libb64 52 openssl 53 curl 54 jq 55 gcc 56 elfutils 57 tbb 58 - libb64 59 re2 60 protobuf 61 grpc ··· 63 jsoncpp 64 nlohmann_json 65 zstd 66 ] ++ lib.optionals (kernel != null) kernel.moduleBuildDependencies; 67 68 hardeningDisable = [ "pic" ]; ··· 72 owner = "falcosecurity"; 73 repo = "libs"; 74 rev = libsRev; 75 - sha256 = libsSha256; 76 }} libs 77 chmod -R +w libs 78 cp -r ${driver} driver-src 79 chmod -R +w driver-src 80 cmakeFlagsArray+=( 81 "-DFALCOSECURITY_LIBS_SOURCE_DIR=$(pwd)/libs" 82 - "-DVALIJSON_INCLUDE=${valijson}/include" 83 "-DDRIVER_SOURCE_DIR=$(pwd)/driver-src/driver" 84 ) 85 ''; ··· 90 "-DUSE_BUNDLED_B64=OFF" 91 "-DUSE_BUNDLED_TBB=OFF" 92 "-DUSE_BUNDLED_RE2=OFF" 93 "-DCREATE_TEST_TARGETS=OFF" 94 ] ++ lib.optional (kernel == null) "-DBUILD_DRIVER=OFF"; 95 96 env.NIX_CFLAGS_COMPILE = ··· 105 exit 1 106 fi 107 cmakeFlagsArray+=(-DCMAKE_EXE_LINKER_FLAGS="-ltbb -lcurl -lzstd -labsl_synchronization") 108 '' + lib.optionalString (kernel != null) '' 109 export INSTALL_MOD_PATH="$out" 110 export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
··· 1 + { lib, stdenv, fetchFromGitHub, cmake, kernel, installShellFiles, pkg-config 2 + , luajit, ncurses, perl, jsoncpp, openssl, curl, jq, gcc, elfutils, tbb, protobuf, grpc 3 + , yaml-cpp, nlohmann_json, re2, zstd, uthash, fetchpatch, fetchurl 4 }: 5 6 let 7 # Compare with https://github.com/draios/sysdig/blob/dev/cmake/modules/falcosecurity-libs.cmake 8 + libsRev = "0.13.1"; 9 + libsHash = "sha256-UNoXIkFr64Nr0XVAtV4+BMNpCk4w8Dn4waZek/ok4Uk="; 10 11 # Compare with https://github.com/falcosecurity/libs/blob/master/cmake/modules/valijson.cmake#L17 12 valijson = fetchFromGitHub { 13 owner = "tristanpenman"; 14 repo = "valijson"; 15 rev = "v0.6"; 16 + hash = "sha256-ZD19Q2MxMQd3yEKbY90GFCrerie5/jzgO8do4JQDoKM="; 17 + }; 18 + 19 + tinydir = fetchFromGitHub { 20 + owner = "cxong"; 21 + repo = "tinydir"; 22 + rev = "1.2.5"; 23 + hash = "sha256-qQhvLzpCYMAafBNRWlY5yklHrILM8BYD+xxF0l17+do="; 24 }; 25 26 # https://github.com/draios/sysdig/blob/0.31.5/cmake/modules/driver.cmake 27 driver = fetchFromGitHub { 28 owner = "falcosecurity"; 29 repo = "libs"; 30 + rev = "6.0.1+driver"; 31 + hash = "sha256-e9TJl/IahrUc4Yq2/KssTz3IBjOZwXeLt1jOkZ94EiE="; 32 }; 33 34 + # can be dropped in next release 35 + uthashDevendorPatch = fetchpatch { 36 + url = "https://github.com/falcosecurity/libs/commit/0d58f798ab72e21a16ee6965c775cba2932e5100.patch"; 37 + hash = "sha256-5Y79M9u5rXZiKllJcXzDDw/3JKt0k/CgvWx+MZepkpw="; 38 + }; 39 + 40 + # https://github.com/falcosecurity/libs/blob/master/cmake/modules/b64.cmake 41 + base64 = fetchurl { 42 + url = "https://raw.githubusercontent.com/istio/proxy/1.18.2/extensions/common/wasm/base64.h"; 43 + hash = "sha256-WvHRHp5caMBDvH+2pMrU4ZptX6WvPcPaeVGtVBBCw64="; 44 + }; 45 in 46 stdenv.mkDerivation rec { 47 pname = "sysdig"; 48 + version = "0.34.1"; 49 50 src = fetchFromGitHub { 51 owner = "draios"; 52 repo = "sysdig"; 53 rev = version; 54 + hash = "sha256-G1yr1wHiaGvLMtBZgh4eoiRNJiH0cghHqWFOjKYXXsw="; 55 }; 56 57 nativeBuildInputs = [ cmake perl installShellFiles pkg-config ]; 58 buildInputs = [ 59 luajit 60 ncurses 61 openssl 62 curl 63 jq 64 gcc 65 elfutils 66 tbb 67 re2 68 protobuf 69 grpc ··· 71 jsoncpp 72 nlohmann_json 73 zstd 74 + uthash 75 ] ++ lib.optionals (kernel != null) kernel.moduleBuildDependencies; 76 77 hardeningDisable = [ "pic" ]; ··· 81 owner = "falcosecurity"; 82 repo = "libs"; 83 rev = libsRev; 84 + hash = libsHash; 85 }} libs 86 chmod -R +w libs 87 + pushd libs 88 + patch -p1 < ${uthashDevendorPatch} 89 + popd 90 + 91 cp -r ${driver} driver-src 92 chmod -R +w driver-src 93 + pushd driver-src 94 + patch -p1 < ${uthashDevendorPatch} 95 + popd 96 cmakeFlagsArray+=( 97 "-DFALCOSECURITY_LIBS_SOURCE_DIR=$(pwd)/libs" 98 "-DDRIVER_SOURCE_DIR=$(pwd)/driver-src/driver" 99 ) 100 ''; ··· 105 "-DUSE_BUNDLED_B64=OFF" 106 "-DUSE_BUNDLED_TBB=OFF" 107 "-DUSE_BUNDLED_RE2=OFF" 108 + "-DUSE_BUNDLED_JSONCPP=OFF" 109 "-DCREATE_TEST_TARGETS=OFF" 110 + "-DVALIJSON_INCLUDE=${valijson}/include" 111 + "-DTINYDIR_INCLUDE=${tinydir}" 112 + "-DUTHASH_INCLUDE=${uthash}/include" 113 ] ++ lib.optional (kernel == null) "-DBUILD_DRIVER=OFF"; 114 115 env.NIX_CFLAGS_COMPILE = ··· 124 exit 1 125 fi 126 cmakeFlagsArray+=(-DCMAKE_EXE_LINKER_FLAGS="-ltbb -lcurl -lzstd -labsl_synchronization") 127 + install -D ${base64} build/b64/base64.h 128 '' + lib.optionalString (kernel != null) '' 129 export INSTALL_MOD_PATH="$out" 130 export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"