Commit 621de936 authored by 7c6f434c's avatar 7c6f434c
Browse files

sysdig: nixfmt

parent 9a207cbd
Loading
Loading
Loading
Loading
+50 −45
Original line number Diff line number Diff line
@@ -76,7 +76,8 @@ stdenv.mkDerivation {
    installShellFiles
    pkg-config
  ];
  buildInputs = [
  buildInputs =
    [
      luajit
      ncurses
      openssl
@@ -91,13 +92,15 @@ stdenv.mkDerivation {
      nlohmann_json
      zstd
      uthash
  ] ++ lib.optionals stdenv.isLinux [
    ]
    ++ lib.optionals stdenv.isLinux [
      bpftools
      elfutils
      libbpf
      clang
      gcc
  ] ++ lib.optionals (kernel != null) kernel.moduleBuildDependencies;
    ]
    ++ lib.optionals (kernel != null) kernel.moduleBuildDependencies;

  hardeningDisable = [
    "pic"
@@ -158,13 +161,15 @@ stdenv.mkDerivation {
      export KERNELDIR="${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
    '';

  postInstall = lib.optionalString stdenv.isLinux ''
  postInstall =
    lib.optionalString stdenv.isLinux ''
      # 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
  '' + lib.optionalString (kernel != null) ''
    ''
    + lib.optionalString (kernel != null) ''
      make install_driver
      kernel_dev=${kernel.dev}
      kernel_dev=''${kernel_dev#${builtins.storeDir}/}