lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 18.09-beta 82 lines 2.3 kB view raw
1{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake, pythonPackages 2, udev, audit, aws-sdk-cpp, cryptsetup, lvm2, libgcrypt, libarchive 3, libgpgerror, libuuid, iptables, dpkg, lzma, bzip2, rpm 4, beecrypt, augeas, libxml2, sleuthkit, yara, lldpd, google-gflags 5, thrift, boost, rocksdb_lite, glog, gbenchmark, snappy 6, openssl, file, doxygen 7, gtest, sqlite, fpm, zstd, rdkafka, rapidjson 8}: 9 10let 11 12 thirdparty = fetchFromGitHub { 13 owner = "osquery"; 14 repo = "third-party"; 15 rev = "32e01462fbea75d3b1904693f937dfd62eaced15"; 16 sha256 = "0va24gmgk43a1lyjs63q9qrhvpv8gmqjzpjr5595vhr16idv8wyf"; 17 }; 18 19in 20 21stdenv.mkDerivation rec { 22 name = "osquery-${version}"; 23 version = "3.2.9"; 24 25 # this is what `osquery --help` will show as the version. 26 OSQUERY_BUILD_VERSION = version; 27 OSQUERY_PLATFORM = "NixOS;"; 28 29 src = fetchFromGitHub { 30 owner = "facebook"; 31 repo = "osquery"; 32 rev = version; 33 sha256 = "1fac0yj1701469qhbsp38ab2fmavm3jw6x278bf78yvxdi99ivai"; 34 }; 35 36 patches = [ ./misc.patch ]; 37 38 nativeBuildInputs = [ 39 pkgconfig cmake pythonPackages.python pythonPackages.jinja2 doxygen fpm 40 ]; 41 42 buildInputs = let 43 gflags' = google-gflags.overrideAttrs (old: { 44 cmakeFlags = stdenv.lib.filter (f: isNull (builtins.match ".*STATIC.*" f)) old.cmakeFlags; 45 }); 46 in [ 47 udev audit 48 49 (aws-sdk-cpp.override { 50 apis = [ "firehose" "kinesis" "sts" "ec2" ]; 51 customMemoryManagement = false; 52 }) 53 54 lvm2 libgcrypt libarchive libgpgerror libuuid iptables dpkg 55 lzma bzip2 rpm beecrypt augeas libxml2 sleuthkit 56 yara lldpd gflags' thrift boost 57 glog gbenchmark snappy openssl 58 file cryptsetup 59 gtest sqlite zstd rdkafka rapidjson rocksdb_lite 60 ]; 61 62 preConfigure = '' 63 export NIX_CFLAGS_COMPILE="-I${libxml2.dev}/include/libxml2 $NIX_CFLAGS_COMPILE" 64 65 cmakeFlagsArray+=( 66 -DCMAKE_LIBRARY_PATH=${cryptsetup}/lib 67 -DCMAKE_VERBOSE_MAKEFILE=OFF 68 ) 69 70 cp -r ${thirdparty}/* third-party 71 chmod +w -R third-party 72 rm -r third-party/{googletest,sqlite3} 73 ''; 74 75 meta = with lib; { 76 description = "SQL powered operating system instrumentation, monitoring, and analytics"; 77 homepage = https://osquery.io/; 78 license = licenses.bsd3; 79 platforms = platforms.linux; 80 maintainers = with maintainers; [ cstrahan ma27 ]; 81 }; 82}