osquery: add unreleased upstream patch for current Clang version

osquery uses vendored boost libraries that still rely on old
standard types like `std::unary_function` (deprecated since
C++11, removed in C++17) which breaks the build with Clang 16.

Upstream already contains a fix [1] that hasn't been released yet.

[1]: https://github.com/osquery/osquery/commit/222991a15b4ae0a0fb919e4965603616536e1b0a

+10
+10
pkgs/tools/system/osquery/default.nix
··· 1 1 { lib 2 2 , cmake 3 3 , fetchFromGitHub 4 + , fetchpatch 4 5 , git 5 6 , llvmPackages 6 7 , nixosTests ··· 32 33 ./Remove-circular-definition-of-AUDIT_FILTER_EXCLUDE.patch 33 34 # For current state of compilation against glibc in the clangWithLLVM toolchain, refer to the upstream issue in https://github.com/osquery/osquery/issues/7823. 34 35 ./Remove-system-controls-table.patch 36 + 37 + # osquery uses a vendored boost library that still relies on old standard types (e.g. `std::unary_function`) 38 + # which have been removed as of C++17. The patch is already checked in upstream, but there have been no 39 + # releases yet. Can likely be removed with versions > 5.10.2. 40 + (fetchpatch { 41 + name = "fix-build-on-clang-16.patch"; 42 + url = "https://github.com/osquery/osquery/commit/222991a15b4ae0a0fb919e4965603616536e1b0a.patch"; 43 + hash = "sha256-PdzEoeR1LXVri1Cd+7KMhKmDC8yZhAx3f1+9tjLJKyo="; 44 + }) 35 45 ]; 36 46 37 47