slackdump: 3.0.3 -> 3.0.5 (#379390)
[NixPkgs.git] / pkgs / by-name / bm / bmon / package.nix
blob9f50559b3817f9040f2a5c70e0c9b2a034d77eb6
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchpatch,
6   autoreconfHook,
7   pkg-config,
8   ncurses,
9   libconfuse,
10   libnl,
13 stdenv.mkDerivation rec {
14   pname = "bmon";
15   version = "4.0";
17   src = fetchFromGitHub {
18     owner = "tgraf";
19     repo = "bmon";
20     rev = "v${version}";
21     sha256 = "1ilba872c09mnlvylslv4hqv6c9cz36l76q74rr99jvis1dg69gf";
22   };
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   ];
34   nativeBuildInputs = [
35     autoreconfHook
36     pkg-config
37   ];
39   buildInputs = [
40     ncurses
41     libconfuse
42   ] ++ lib.optional stdenv.hostPlatform.isLinux libnl;
44   preConfigure = ''
45     # Must be an absolute path
46     export PKG_CONFIG="$(command -v "$PKG_CONFIG")"
47   '';
49   meta = with lib; {
50     description = "Network bandwidth monitor";
51     homepage = "https://github.com/tgraf/bmon";
52     # Licensed unter BSD and MIT
53     #  - https://github.com/tgraf/bmon/blob/master/LICENSE.BSD
54     #  - https://github.com/tgraf/bmon/blob/master/LICENSE.MIT
55     license = licenses.bsd2;
56     platforms = platforms.unix;
57     maintainers = with maintainers; [
58       bjornfor
59       pSub
60     ];
61     mainProgram = "bmon";
62   };