@@ -1,6 +1,6 @@
1−{ lib, stdenv, fetchFromGitHub
1+{ lib, stdenv, fetchFromGitHub, makeWrapper
22, meson, ninja, pkg-config, wayland-protocols
3−, pipewire, wayland, systemd, libdrm, iniparser, scdoc }:
3+, pipewire, wayland, systemd, libdrm, iniparser, scdoc, grim }:
44
55stdenv.mkDerivation rec {
66 pname = "xdg-desktop-portal-wlr";
@@ -13,13 +13,17 @@ stdenv.mkDerivation rec {
1313 sha256 = "sha256-6ArUQfWx5rNdpsd8Q22MqlpxLT8GTSsymAf21zGe1KI=";
1414 };
1515
16− nativeBuildInputs = [ meson ninja pkg-config wayland-protocols ];
16+ nativeBuildInputs = [ meson ninja pkg-config wayland-protocols makeWrapper ];
1717 buildInputs = [ pipewire wayland systemd libdrm iniparser scdoc ];
1818
1919 mesonFlags = [
2020 "-Dsd-bus-provider=libsystemd"
2121 ];
2222
23+ postInstall = ''
24+ wrapProgram $out/libexec/xdg-desktop-portal-wlr --prefix PATH ":" ${lib.makeBinPath [ grim ]}
25+ '';
26+
2327 meta = with lib; {
2428 homepage = "https://github.com/emersion/xdg-desktop-portal-wlr";
2529 description = "xdg-desktop-portal backend for wlroots";