Commit 9a207cbd authored by Jörg Thalheim's avatar Jörg Thalheim
Browse files

sysdig: fix build on macOS

parent 75cd88fa
Loading
Loading
Loading
Loading
+28 −29
Original line number Diff line number Diff line
@@ -82,8 +82,6 @@ stdenv.mkDerivation {
    openssl
    curl
    jq
    gcc
    elfutils
    tbb
    re2
    protobuf
@@ -93,9 +91,12 @@ stdenv.mkDerivation {
    nlohmann_json
    zstd
    uthash
    clang
    libbpf
  ] ++ lib.optionals stdenv.isLinux [
    bpftools
    elfutils
    libbpf
    clang
    gcc
  ] ++ lib.optionals (kernel != null) kernel.moduleBuildDependencies;

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

  postInstall =
    ''
  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}/}