about summary refs log tree commit diff
path: root/pkgs/tools/wayland/wl-clipboard/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/wayland/wl-clipboard/default.nix')
-rw-r--r--pkgs/tools/wayland/wl-clipboard/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/tools/wayland/wl-clipboard/default.nix b/pkgs/tools/wayland/wl-clipboard/default.nix
index 8d812ac1685b1..dc5b9ed900de4 100644
--- a/pkgs/tools/wayland/wl-clipboard/default.nix
+++ b/pkgs/tools/wayland/wl-clipboard/default.nix
@@ -7,6 +7,8 @@
 , wayland
 , wayland-protocols
 , wayland-scanner
+, xdg-utils
+, makeWrapper
 }:
 
 stdenv.mkDerivation rec {
@@ -21,18 +23,24 @@ stdenv.mkDerivation rec {
   };
 
   strictDeps = true;
-  nativeBuildInputs = [ meson ninja pkg-config wayland-scanner ];
+  nativeBuildInputs = [ meson ninja pkg-config wayland-scanner makeWrapper ];
   buildInputs = [ wayland wayland-protocols ];
 
   mesonFlags = [
     "-Dfishcompletiondir=share/fish/vendor_completions.d"
   ];
 
+  # Fix for https://github.com/NixOS/nixpkgs/issues/251261
+  postInstall = lib.optionalString (!xdg-utils.meta.broken) ''
+    wrapProgram $out/bin/wl-copy \
+      --suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
+  '';
+
   meta = with lib; {
     homepage = "https://github.com/bugaevc/wl-clipboard";
     description = "Command-line copy/paste utilities for Wayland";
     license = licenses.gpl3Plus;
-    maintainers = with maintainers; [ dywedir ];
+    maintainers = with maintainers; [ dywedir kashw2 ];
     platforms = platforms.unix;
   };
 }