From e15aa51f2f419bf5e08d9afdfbcced8407733288 Mon Sep 17 00:00:00 2001 From: Vladimir Kirillov Date: Mon, 1 Sep 2014 21:28:14 +0300 Subject: [PATCH] sysdig: cheat nix into not capturing linux-dev as a runtime dependency --- pkgs/os-specific/linux/sysdig/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index 4abbb4c45b43..80677a52a32b 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -10,7 +10,7 @@ let }; buildInputs = [ cmake zlib luajit - ] ++ optional (kernel != null) kernel; + ]; in stdenv.mkDerivation { inherit (s) name version; @@ -30,6 +30,10 @@ stdenv.mkDerivation { ''; postInstall = optionalString (kernel != null) '' make install_driver + 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 ''; meta = with stdenv.lib; {