forked from mirrors/nixpkgs
sysdig: 0.6.0 -> 0.8.0; unpack kernel module when needed
This commit is contained in:
parent
4e27311fbf
commit
1e80424799
|
@ -3,10 +3,10 @@ let
|
|||
inherit (stdenv.lib) optional optionalString;
|
||||
s = rec {
|
||||
baseName="sysdig";
|
||||
version = "0.6.0";
|
||||
version = "0.8.0";
|
||||
name="${baseName}-${version}";
|
||||
url="https://github.com/draios/sysdig/archive/${version}.tar.gz";
|
||||
sha256 = "0729mjs9gpd7kb495q80zlp23zczm8ka3xcq4571c0sm732sa3g3";
|
||||
sha256 = "1939k3clwxg09m1bn0szqiy2nxg66srl72n7476jc58hgaraq3dr";
|
||||
};
|
||||
buildInputs = [
|
||||
cmake zlib luajit ncurses perl jsoncpp libb64 openssl curl
|
||||
|
@ -32,7 +32,13 @@ stdenv.mkDerivation {
|
|||
kernel_dev=${kernel.dev}
|
||||
kernel_dev=''${kernel_dev#/nix/store/}
|
||||
kernel_dev=''${kernel_dev%%-linux*dev*}
|
||||
sed -i "s#$kernel_dev#................................#g" $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko
|
||||
if test -f "$out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko"; then
|
||||
sed -i "s#$kernel_dev#................................#g" $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko
|
||||
else
|
||||
xz -d $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko.xz
|
||||
sed -i "s#$kernel_dev#................................#g" $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko
|
||||
xz $out/lib/modules/${kernel.modDirVersion}/extra/sysdig-probe.ko
|
||||
fi
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
Loading…
Reference in a new issue