Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 autoreconfHook, 5 fetchFromGitHub, 6 fetchpatch, 7 libpcap, 8 zlib, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "darkstat"; 13 version = "3.0.721"; 14 15 src = fetchFromGitHub { 16 owner = "emikulic"; 17 repo = "darkstat"; 18 tag = version; 19 hash = "sha256-kKj4fCgphoe3lojJfARwpITxQh7E6ehUew9FVEW63uQ="; 20 }; 21 22 patches = [ 23 # Avoid multiple definitions of CLOCK_REALTIME on macOS 11, 24 # see https://github.com/emikulic/darkstat/pull/2 25 (fetchpatch { 26 url = "https://github.com/emikulic/darkstat/commit/d2fd232e1167dee6e7a2d88b9ab7acf2a129f697.diff"; 27 sha256 = "0z5mpyc0q65qb6cn4xcrxl0vx21d8ibzaam5kjyrcw4icd8yg4jb"; 28 }) 29 ]; 30 31 nativeBuildInputs = [ 32 autoreconfHook 33 ]; 34 35 buildInputs = [ 36 libpcap 37 zlib 38 ]; 39 40 enableParallelBuilding = true; 41 42 meta = { 43 description = "Network statistics web interface"; 44 longDescription = '' 45 Captures network traffic, calculates statistics about usage, and serves 46 reports over HTTP. Features: 47 - Traffic graphs, reports per host, shows ports for each host. 48 - Embedded web-server with deflate compression. 49 - Asynchronous reverse DNS resolution using a child process. 50 - Small. Portable. Single-threaded. Efficient. 51 - Supports IPv6. 52 ''; 53 homepage = "http://unix4lyfe.org/darkstat"; 54 changelog = "https://github.com/emikulic/darkstat/releases/tag/${version}"; 55 license = lib.licenses.gpl2Only; 56 platforms = with lib.platforms; unix; 57 mainProgram = "darkstat"; 58 }; 59}