about summary refs log tree commit diff
path: root/pkgs/applications/misc/dmenu/wayland.nix
blob: 9a13da677456d80a8844171710ae5b290907f013 (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
{stdenv, fetchurl #, libX11, libXinerama, enableXft, libXft, zlib
, swc, wld, wayland, libxkbcommon, pixman, fontconfig
}:

with stdenv.lib;

stdenv.mkDerivation rec {
  name = "dmenu-wayland-${version}";
  version = "git-2014-11-02";
  rev = "6e08b77428cc3c406ed2e90d4cae6c41df76341e";

  src = fetchurl {
    url = "https://github.com/michaelforney/dmenu/archive/${rev}.tar.gz";
    sha256 = "d0f73e442baf44a93a3b9d41a72e9cfa14f54af6049c90549f516722e3f88019";
  };

  buildInputs = [ swc wld wayland libxkbcommon pixman fontconfig ];

  postPatch = ''
    sed -ri -e 's!\<(dmenu|dmenu_path)\>!'"$out/bin"'/&!g' dmenu_run
  '';

  preConfigure = [
    ''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g; s@/usr/share/swc@$(echo "$nativeBuildInputs" | grep -o '[^ ]*-swc-[^ ]*')/share/swc@g" config.mk''
  ];

  meta = {
      description = "A generic, highly customizable, and efficient menu for the X Window System";
      homepage = http://tools.suckless.org/dmenu;
      license = stdenv.lib.licenses.mit;
      maintainers = with stdenv.lib.maintainers; [ ];
      platforms = with stdenv.lib.platforms; all;
  };
}