nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 64 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 autoreconfHook, 7 pkg-config, 8 ncurses, 9 libconfuse, 10 libnl, 11}: 12 13stdenv.mkDerivation rec { 14 pname = "bmon"; 15 version = "4.0"; 16 17 src = fetchFromGitHub { 18 owner = "tgraf"; 19 repo = "bmon"; 20 rev = "v${version}"; 21 sha256 = "1ilba872c09mnlvylslv4hqv6c9cz36l76q74rr99jvis1dg69gf"; 22 }; 23 24 # The source code defines `__unused__`, which is a reserved name 25 # https://github.com/tgraf/bmon/issues/89 26 patches = [ 27 (fetchpatch { 28 url = "https://github.com/macports/macports-ports/raw/6d1dd5e9c8fae608bd22f3ede21e576f29c6358c/net/bmon/files/patch-fix__unused.diff"; 29 extraPrefix = ""; 30 sha256 = "sha256-UYIiJZzipsx9a0xabrKfyj8TWNW7IM77oXnVnSPkQkc="; 31 }) 32 ]; 33 34 nativeBuildInputs = [ 35 autoreconfHook 36 pkg-config 37 ]; 38 39 buildInputs = [ 40 ncurses 41 libconfuse 42 ] 43 ++ lib.optional stdenv.hostPlatform.isLinux libnl; 44 45 preConfigure = '' 46 # Must be an absolute path 47 export PKG_CONFIG="$(command -v "$PKG_CONFIG")" 48 ''; 49 50 meta = with lib; { 51 description = "Network bandwidth monitor"; 52 homepage = "https://github.com/tgraf/bmon"; 53 # Licensed under BSD and MIT 54 # - https://github.com/tgraf/bmon/blob/master/LICENSE.BSD 55 # - https://github.com/tgraf/bmon/blob/master/LICENSE.MIT 56 license = licenses.bsd2; 57 platforms = platforms.unix; 58 maintainers = with maintainers; [ 59 bjornfor 60 pSub 61 ]; 62 mainProgram = "bmon"; 63 }; 64}