about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/dmenu/wayland.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/dmenu/wayland.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/dmenu/wayland.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/applications/misc/dmenu/wayland.nix b/nixpkgs/pkgs/applications/misc/dmenu/wayland.nix
index 8d77588ce8f1..6b8f92ddb1c2 100644
--- a/nixpkgs/pkgs/applications/misc/dmenu/wayland.nix
+++ b/nixpkgs/pkgs/applications/misc/dmenu/wayland.nix
@@ -1,5 +1,6 @@
 { lib, stdenv, fetchFromGitHub, meson, ninja, cairo, pango, pkg-config, wayland-protocols
-, glib, wayland, libxkbcommon, makeWrapper
+, glib, wayland, libxkbcommon, makeWrapper, wayland-scanner
+, fetchpatch
 }:
 
 stdenv.mkDerivation rec {
@@ -15,9 +16,19 @@ stdenv.mkDerivation rec {
 
   outputs = [ "out" "man" ];
 
-  nativeBuildInputs = [ meson ninja pkg-config makeWrapper ];
+  depsBuildBuild = [ pkg-config ];
+  nativeBuildInputs = [ meson ninja pkg-config makeWrapper wayland-scanner ];
   buildInputs = [ cairo pango wayland-protocols glib wayland libxkbcommon ];
 
+  # Patch to support cross-compilation, see https://github.com/nyyManni/dmenu-wayland/pull/23/
+  patches = [
+    # can be removed when https://github.com/nyyManni/dmenu-wayland/pull/23 is included
+    (fetchpatch {
+      url = "https://github.com/nyyManni/dmenu-wayland/commit/3434410de5dcb007539495395f7dc5421923dd3a.patch";
+      sha256 = "sha256-im16kU8RWrCY0btYOYjDp8XtfGEivemIPlhwPX0C77o=";
+    })
+  ];
+
   postInstall = ''
     wrapProgram $out/bin/dmenu-wl_run \
       --prefix PATH : $out/bin