22 info = builtins.fromJSON (builtins.readFile ./info.json);
24 opensslSrc = fetchurl info.openssl;
26 toolchain = import ./toolchain-bin.nix { inherit stdenv lib fetchzip autoPatchelfHook; };
30 stdenvNoCC.mkDerivation rec {
34 version = info.osquery.rev;
36 src = fetchFromGitHub info.osquery;
39 ./Remove-git-reset.patch
54 substituteInPlace cmake/install_directives.cmake --replace "/control" "control"
61 -DCMAKE_INSTALL_PREFIX=$out \
62 -DOSQUERY_TOOLCHAIN_SYSROOT=${toolchain} \
63 -DOSQUERY_VERSION=${version} \
64 -DCMAKE_PREFIX_PATH=${toolchain}/usr/lib/cmake \
65 -DCMAKE_LIBRARY_PATH=${toolchain}/usr/lib \
66 -DOSQUERY_OPENSSL_ARCHIVE_PATH=${opensslSrc} \
70 disallowedReferences = [ toolchain ];
74 remove-references-to -t ${toolchain} $out/bin/osqueryd
78 inherit opensslSrc toolchain;
80 inherit (nixosTests) osquery;
82 updateScript = writers.writePython3
84 { makeWrapperArgs = "--prefix PATH : ${lib.makeBinPath [ nix-prefetch-git ]}"; }
85 (builtins.readFile ./update.py);
89 description = "SQL powered operating system instrumentation, monitoring, and analytics";
90 homepage = "https://osquery.io";
91 license = with licenses; [ gpl2Only asl20 ];
92 platforms = platforms.linux;
93 sourceProvenance = with sourceTypes; [ fromSource ];
94 maintainers = with maintainers; [ znewman01 lewo squalus ];