Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / dmenu / wayland.nix
blob08e9d9422459bf2eaf181579f5216babcdd945ac
1 { lib, stdenv, fetchFromGitHub, meson, ninja, cairo, pango, pkg-config, wayland-protocols
2 , glib, wayland, libxkbcommon, makeWrapper, wayland-scanner
3 , fetchpatch
4 }:
6 stdenv.mkDerivation rec {
7   pname = "dmenu-wayland";
8   version = "unstable-2023-05-18";
10   src = fetchFromGitHub {
11     owner = "nyyManni";
12     repo = "dmenu-wayland";
13     rev = "a380201dff5bfac2dace553d7eaedb6cea6855f9";
14     hash = "sha256-dqFvU2mRYEw7n8Fmbudwi5XMLQ7mQXFkug9D9j4FIrU=";
15   };
17   outputs = [ "out" "man" ];
19   depsBuildBuild = [ pkg-config ];
20   nativeBuildInputs = [ meson ninja pkg-config makeWrapper wayland-scanner ];
21   buildInputs = [ cairo pango wayland-protocols glib wayland libxkbcommon ];
23   patches = [
24     # can be removed when https://github.com/nyyManni/dmenu-wayland/pull/23 is included
25     (fetchpatch {
26       name = "support-cross-compilation.patch";
27       url = "https://github.com/nyyManni/dmenu-wayland/commit/3434410de5dcb007539495395f7dc5421923dd3a.patch";
28       sha256 = "sha256-im16kU8RWrCY0btYOYjDp8XtfGEivemIPlhwPX0C77o=";
29     })
30   ];
32   postInstall = ''
33     wrapProgram $out/bin/dmenu-wl_run \
34       --prefix PATH : $out/bin
35   '';
37   meta = with lib; {
38     license = licenses.mit;
39     platforms = platforms.linux;
40     description = "An efficient dynamic menu for wayland (wlroots)";
41     homepage = "https://github.com/nyyManni/dmenu-wayland";
42     maintainers = with maintainers; [ rewine ];
43   };