sysdig: 0.34.1 -> 0.35.1

This commit is contained in:
Sebastian Sellmeier 2024-02-11 13:41:42 +01:00
parent 0dc186716d
commit b18a422f41
No known key found for this signature in database
GPG key ID: 51E2BE0CCC826F98

View file

@ -4,11 +4,11 @@
}:
let
# Compare with https://github.com/draios/sysdig/blob/dev/cmake/modules/falcosecurity-libs.cmake
libsRev = "0.13.1";
libsHash = "sha256-UNoXIkFr64Nr0XVAtV4+BMNpCk4w8Dn4waZek/ok4Uk=";
# Compare with https://github.com/draios/sysdig/blob/0.35.1/cmake/modules/falcosecurity-libs.cmake
libsRev = "0.14.2";
libsHash = "sha256-sWrniRB/vQd1BZnsiz+wLHugrF3LhuAr9e9gDMavLoo=";
# Compare with https://github.com/falcosecurity/libs/blob/master/cmake/modules/valijson.cmake#L17
# Compare with https://github.com/falcosecurity/libs/blob/0.14.2/cmake/modules/valijson.cmake
valijson = fetchFromGitHub {
owner = "tristanpenman";
repo = "valijson";
@ -23,35 +23,23 @@ let
hash = "sha256-qQhvLzpCYMAafBNRWlY5yklHrILM8BYD+xxF0l17+do=";
};
# https://github.com/draios/sysdig/blob/0.31.5/cmake/modules/driver.cmake
# https://github.com/draios/sysdig/blob/0.35.1/cmake/modules/driver.cmake
driver = fetchFromGitHub {
owner = "falcosecurity";
repo = "libs";
rev = "6.0.1+driver";
hash = "sha256-e9TJl/IahrUc4Yq2/KssTz3IBjOZwXeLt1jOkZ94EiE=";
};
# can be dropped in next release
uthashDevendorPatch = fetchpatch {
url = "https://github.com/falcosecurity/libs/commit/0d58f798ab72e21a16ee6965c775cba2932e5100.patch";
hash = "sha256-5Y79M9u5rXZiKllJcXzDDw/3JKt0k/CgvWx+MZepkpw=";
};
# https://github.com/falcosecurity/libs/blob/master/cmake/modules/b64.cmake
base64 = fetchurl {
url = "https://raw.githubusercontent.com/istio/proxy/1.18.2/extensions/common/wasm/base64.h";
hash = "sha256-WvHRHp5caMBDvH+2pMrU4ZptX6WvPcPaeVGtVBBCw64=";
rev = "7.0.0+driver";
hash = "sha256-kXqvfM7HbGh2wEGaO4KBkFDW+m5gpOShJZKJLu9McKk=";
};
in
stdenv.mkDerivation rec {
pname = "sysdig";
version = "0.34.1";
version = "0.35.1";
src = fetchFromGitHub {
owner = "draios";
repo = "sysdig";
rev = version;
hash = "sha256-G1yr1wHiaGvLMtBZgh4eoiRNJiH0cghHqWFOjKYXXsw=";
hash = "sha256-nSCkKwhdEduepyvcyWEKMQtQ6TfhF3GnTSreRVoarsw=";
};
nativeBuildInputs = [ cmake perl installShellFiles pkg-config ];
@ -84,15 +72,13 @@ stdenv.mkDerivation rec {
hash = libsHash;
}} libs
chmod -R +w libs
pushd libs
patch -p1 < ${uthashDevendorPatch}
popd
substituteInPlace libs/userspace/libscap/libscap.pc.in libs/userspace/libsinsp/libsinsp.pc.in \
--replace-fail "\''${prefix}/@CMAKE_INSTALL_LIBDIR@" "@CMAKE_INSTALL_FULL_LIBDIR@" \
--replace-fail "\''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@" "@CMAKE_INSTALL_FULL_INCLUDEDIR@"
cp -r ${driver} driver-src
chmod -R +w driver-src
pushd driver-src
patch -p1 < ${uthashDevendorPatch}
popd
cmakeFlagsArray+=(
"-DFALCOSECURITY_LIBS_SOURCE_DIR=$(pwd)/libs"
"-DDRIVER_SOURCE_DIR=$(pwd)/driver-src/driver"
@ -124,7 +110,6 @@ stdenv.mkDerivation rec {
exit 1
fi
cmakeFlagsArray+=(-DCMAKE_EXE_LINKER_FLAGS="-ltbb -lcurl -lzstd -labsl_synchronization")
install -D ${base64} build/b64/base64.h
'' + lib.optionalString (kernel != null) ''
export INSTALL_MOD_PATH="$out"
export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"