nixpkgs/pkgs/tools/system/osquery/toolchain-bin.nix
squalus a91ac78a36 osquery: 5.5.1 -> 5.12.2
- Update to 5.12.2
- Switch to the upstream supported osquery-toolchain
- Upstream binaries for the toolchain were used. Efforts to reproduce
  the upstream toolchain from source were unsuccessful. Future work
  could involve building this from source.
- Efforts to use a newer toolchain provided by nixpkgs were
  unsuccessful. osquery assumes that osquery-toolchain and its included
  LLVM 9 compiler and libraries are available. LLVM 9 is no longer present
  in nixpkgs.
- Remove patches that are no longer necessary
- Use the exact version of openssl provided by upstream. This was
  necessary due to build errors when using the nixpkgs openssl package.
- Add code that will fail the build if the openssl hashes from the
  fetcher do not match what upstream expects
2024-06-18 08:23:18 -07:00

43 lines
1.2 KiB
Nix

{ stdenvNoCC, lib, autoPatchelfHook, fetchzip }:
let
version = "1.1.0";
dist = {
"x86_64-linux" = {
url = "https://github.com/osquery/osquery-toolchain/releases/download/${version}/osquery-toolchain-${version}-x86_64.tar.xz";
hash = "sha256-irekR8a0d+T64+ZObgblsLoc4kVBmb6Gv0Qf8dLDCMk=";
};
"aarch64-linux" = {
url = "https://github.com/osquery/osquery-toolchain/releases/download/${version}/osquery-toolchain-${version}-aarch64.tar.xz";
hash = "sha256-cQlx9AtO6ggIQqHowa+42wQ4YCMCN4Gb+0qqVl2JElw=";
};
};
in
stdenvNoCC.mkDerivation {
name = "osquery-toolchain-bin";
inherit version;
src = fetchzip dist.${stdenvNoCC.hostPlatform.system};
nativeBuildInputs = [ autoPatchelfHook ];
installPhase = ''
mkdir $out
cp -r * $out
'';
meta = with lib; {
description = "A LLVM-based toolchain for Linux designed to build a portable osquery";
homepage = "https://github.com/osquery/osquery-toolchain";
platforms = [ "x86_64-linux" "aarch64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = with licenses; [ gpl2Only asl20 ];
maintainers = with maintainers; [ squalus ];
};
}