anchor.diff:      sha256 = "sha256-lYjMvxMIReANNwMr62u881Nugrs9piOaN3EmrvGzRns=";
     };
   
  -  nativeBuildInputs = [ cmake perl ];
  +  nativeBuildInputs = [ cmake perl installShellFiles ];
     buildInputs = [
       zlib luajit ncurses jsoncpp libb64 openssl curl jq gcc elfutils tbb c-ares protobuf grpc
     ] ++ optionals (kernel != null) kernel.moduleBuildDependencies;
  
positive.code: { stdenv, fetchFromGitHub, cmake, kernel
  , luajit, zlib, ncurses, perl, jsoncpp, libb64, openssl, curl, jq, gcc, elfutils, tbb, c-ares, protobuf, grpc
  }:
  
  
negative.code:     export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
    '';
  
    postInstall =
      ''
        # Fix the bash completion location
        installShellCompletion --bash $out/etc/bash_completion.d/sysdig
        rm $out/etc/bash_completion.d/sysdig
        rmdir $out/etc/bash_completion.d
        rmdir $out/etc
      ''
      + optionalString (kernel != null) ''
        make install_driver
        kernel_dev=${kernel.dev}
        kernel_dev=''${kernel_dev#/nix/store/}
        kernel_dev=''${kernel_dev%%-linux*dev*}
        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 = {
      description = "A tracepoint-based system tracing tool for Linux (with clients for other OSes)";
  