summary refs log tree commit diff
path: root/pkgs/applications/misc/bemenu/default.nix
blob: 8945ffbb384f558b47d19966d18e6a13a41ceeb6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ stdenv, fetchFromGitHub, cairo, cmake, libxkbcommon
, pango, fribidi, harfbuzz, pcre, pkgconfig
, ncursesSupport ? true, ncurses ? null
, waylandSupport ? true, wayland ? null
, x11Support ? true, xlibs ? null, xorg ? null
}:

assert ncursesSupport -> ncurses != null;
assert waylandSupport -> wayland != null;
assert x11Support -> xlibs != null && xorg != null;

stdenv.mkDerivation {
  pname = "bemenu";
  version = "0.1.0";

  src = fetchFromGitHub {
    owner = "Cloudef";
    repo = "bemenu";
    rev = "33e540a2b04ce78f5c7ab4a60b899c67f586cc32";
    sha256 = "11h55m9dx6ai12pqij52ydjm36dvrcc856pa834njihrp626pl4w";
  };

  nativeBuildInputs = [ cmake pkgconfig pcre ];

  buildInputs = with stdenv.lib; [
    cairo
    fribidi
    harfbuzz
    libxkbcommon
    pango
  ] ++ optionals ncursesSupport [ ncurses ]
    ++ optionals waylandSupport [ wayland ]
    ++ optionals x11Support [
      xlibs.libX11 xlibs.libXinerama xlibs.libXft
      xorg.libXdmcp xorg.libpthreadstubs xorg.libxcb
    ];

  meta = with stdenv.lib; {
    homepage = "https://github.com/Cloudef/bemenu";
    description = "Dynamic menu library and client program inspired by dmenu";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ thiagokokada ];
    platforms = with platforms; linux;
  };
}