mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
Merge pull request #288032 from SebTM/update/sysdig_0351
sysdig: 0.34.1 -> 0.35.1
This commit is contained in:
commit
4477ea4df7
|
@ -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";
|
||||
|
@ -16,42 +16,23 @@ let
|
|||
hash = "sha256-ZD19Q2MxMQd3yEKbY90GFCrerie5/jzgO8do4JQDoKM=";
|
||||
};
|
||||
|
||||
tinydir = fetchFromGitHub {
|
||||
owner = "cxong";
|
||||
repo = "tinydir";
|
||||
rev = "1.2.5";
|
||||
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 +65,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"
|
||||
|
@ -108,7 +87,6 @@ stdenv.mkDerivation rec {
|
|||
"-DUSE_BUNDLED_JSONCPP=OFF"
|
||||
"-DCREATE_TEST_TARGETS=OFF"
|
||||
"-DVALIJSON_INCLUDE=${valijson}/include"
|
||||
"-DTINYDIR_INCLUDE=${tinydir}"
|
||||
"-DUTHASH_INCLUDE=${uthash}/include"
|
||||
] ++ lib.optional (kernel == null) "-DBUILD_DRIVER=OFF";
|
||||
|
||||
|
@ -124,7 +102,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"
|
||||
|
|
Loading…
Reference in a new issue