Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f196333

Browse files
committedApr 7, 2020
sysdig: fix linux 5.6 build
1 parent 7183053 commit f196333

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed
 

‎pkgs/os-specific/linux/sysdig/default.nix

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, fetchFromGitHub, cmake, kernel
1+
{ stdenv, fetchFromGitHub, fetchpatch, cmake, kernel
22
, luajit, zlib, ncurses, perl, jsoncpp, libb64, openssl, curl, jq, gcc, elfutils, tbb, c-ares, protobuf, grpc
33
}:
44

@@ -27,16 +27,22 @@ stdenv.mkDerivation rec {
2727
"-DCREATE_TEST_TARGETS=OFF"
2828
] ++ optional (kernel == null) "-DBUILD_DRIVER=OFF";
2929

30-
# needed since luajit-2.1.0-beta3
31-
NIX_CFLAGS_COMPILE = "-DluaL_reg=luaL_Reg -DluaL_getn(L,i)=((int)lua_objlen(L,i))";
30+
NIX_CFLAGS_COMPILE = toString [
31+
"-ltbb -lcurl"
32+
# needed since luajit-2.1.0-beta3
33+
"-DluaL_reg=luaL_Reg -DluaL_getn(L,i)=((int)lua_objlen(L,i))"
34+
];
3235

33-
preConfigure = ''
34-
cmakeFlagsArray+=(-DCMAKE_EXE_LINKER_FLAGS="-ltbb -lcurl")
36+
patches = [
37+
(fetchpatch {
38+
url = "https://github.com/Mic92/sysdig/commit/798c43d814c74d7fb955933cda35979e82fb8f92.patch";
39+
sha256 = "10qky6s924yrvk3n9qvy3sxx1bw7c073rzcj0zq46rwihdgb6bw1";
40+
})
41+
];
3542

36-
export INSTALL_MOD_PATH="$out"
37-
'' + optionalString (kernel != null) ''
38-
export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
39-
'';
43+
KERNELDIR = stdenv.lib.optionalString (kernel != null)
44+
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
45+
INSTALL_MOD_PATH = placeholder "out";
4046

4147
postInstall = optionalString (kernel != null) ''
4248
make install_driver

0 commit comments

Comments
 (0)
Please sign in to comment.