1 { lib, stdenv, fetchFromGitHub, rustPlatform, Security, fetchpatch }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitHub {
11 hash = "sha256-lggeJrPfZTpUEydFJ9XXgbbS3pmrGqTef2ROsPOmiwQ=";
14 cargoHash = "sha256-kGRsF+THNQahEoD3vY+XcPrr9cHjchtg86tMvcIdHPk=";
16 buildInputs = lib.optional stdenv.isDarwin Security;
18 # 10 passed; 47 failed https://hydra.nixos.org/build/148943783/nixlog/1
19 doCheck = !stdenv.isDarwin;
22 # FIXME: remove when the linked-hash-map dependency is bumped upstream
23 # https://github.com/imsnif/bandwhich/pull/222/
25 name = "update-linked-hash-map.patch";
26 url = "https://github.com/imsnif/bandwhich/commit/be06905de2c4fb91afc22d50bf3cfe5a1e8003f5.patch";
27 hash = "sha256-FyZ7jUXK7ebXq7q/lvRSe7YdPnpYWKZE3WrSKLMjJeA=";
30 # Tweaked https://github.com/imsnif/bandwhich/pull/245 so that it merges
31 # cleanly with the earlier patch.
32 ./update-socket2-for-rust-1.64.diff
36 description = "A CLI utility for displaying current network utilization";
38 bandwhich sniffs a given network interface and records IP packet size, cross
39 referencing it with the /proc filesystem on linux or lsof on MacOS. It is
40 responsive to the terminal window size, displaying less info if there is
41 no room for it. It will also attempt to resolve ips to their host name in
42 the background using reverse DNS on a best effort basis.
44 homepage = "https://github.com/imsnif/bandwhich";
45 license = licenses.mit;
46 maintainers = with maintainers; [ Br1ght0ne SuperSandro2000 ];
47 platforms = platforms.unix;