at master 67 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 autoreconfHook, 6 pkg-config, 7 libpcap, 8 nix-update-script, 9}: 10 11stdenv.mkDerivation (finalAttrs: { 12 pname = "libdaq"; 13 version = "3.0.19"; 14 15 src = fetchFromGitHub { 16 owner = "snort3"; 17 repo = "libdaq"; 18 tag = "v${finalAttrs.version}"; 19 hash = "sha256-ma+M/rIbChqL0pjhE0a1UfJLm/r7I7IvIuSwcnQWvAQ="; 20 }; 21 22 nativeBuildInputs = [ 23 autoreconfHook 24 pkg-config 25 ]; 26 27 buildInputs = [ 28 libpcap 29 stdenv.cc.cc # libstdc++ 30 ]; 31 32 outputs = [ 33 "lib" 34 "dev" 35 "out" 36 ]; 37 38 autoreconfPhase = '' 39 ./bootstrap 40 ''; 41 42 postInstall = '' 43 # remove build directory (/build/**, or /tmp/nix-build-**) from RPATHs 44 for f in "$out"/bin/*; do 45 local nrp="$(patchelf --print-rpath "$f" | sed -E 's@(:|^)'$NIX_BUILD_TOP'[^:]*:@\1@g')" 46 patchelf --set-rpath "$nrp" "$f" 47 done 48 ''; 49 50 passthru.updateScript = nix-update-script { }; 51 52 meta = { 53 description = "Data AcQuisition library (libDAQ), for snort packet I/O"; 54 homepage = "https://www.snort.org"; 55 maintainers = with lib.maintainers; [ 56 aycanirican 57 brianmcgillion 58 ]; 59 changelog = "https://github.com/snort3/libdaq/releases/tag/v${finalAttrs.version}/changelog.md"; 60 license = lib.licenses.gpl2; 61 outputsToInstall = [ 62 "lib" 63 "dev" 64 ]; 65 platforms = with lib.platforms; linux; 66 }; 67})