dmenu-wayland: support cross-compilation

This commit is contained in:
Rick van Schijndel 2021-07-15 22:01:32 +02:00
parent bdc08fd5c5
commit f3c271e797

View file

@ -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