summary refs log tree commit diff
path: root/pkgs/tools/wayland
diff options
context:
space:
mode:
authorSamuel Gräfenstein <git@samuelgrf.com>2021-12-02 14:17:32 +0100
committerSamuel Gräfenstein <git@samuelgrf.com>2021-12-03 10:20:33 +0100
commit639c8aac781370deac15711cd1169d96f95a3cad (patch)
treedb676995f057d57027028adc151874c3cf0d5069 /pkgs/tools/wayland
parent6bad84a25da85dd16a2c9badd2ed893ad231210f (diff)
downloadnixpkgs-639c8aac781370deac15711cd1169d96f95a3cad.tar
nixpkgs-639c8aac781370deac15711cd1169d96f95a3cad.tar.gz
nixpkgs-639c8aac781370deac15711cd1169d96f95a3cad.tar.bz2
nixpkgs-639c8aac781370deac15711cd1169d96f95a3cad.tar.lz
nixpkgs-639c8aac781370deac15711cd1169d96f95a3cad.tar.xz
nixpkgs-639c8aac781370deac15711cd1169d96f95a3cad.tar.zst
nixpkgs-639c8aac781370deac15711cd1169d96f95a3cad.zip
wl-clipboard-x11: Init at 5
Diffstat (limited to 'pkgs/tools/wayland')
-rw-r--r--pkgs/tools/wayland/wl-clipboard-x11/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/tools/wayland/wl-clipboard-x11/default.nix b/pkgs/tools/wayland/wl-clipboard-x11/default.nix
new file mode 100644
index 00000000000..5e87342dff8
--- /dev/null
+++ b/pkgs/tools/wayland/wl-clipboard-x11/default.nix
@@ -0,0 +1,29 @@
+{ lib, stdenv, fetchFromGitHub, wl-clipboard }:
+
+stdenv.mkDerivation rec {
+  pname = "wl-clipboard-x11";
+  version = "5";
+
+  src = fetchFromGitHub {
+    owner = "brunelli";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-i+oF1Mu72O5WPTWzqsvo4l2CERWWp4Jq/U0DffPZ8vg=";
+  };
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  postPatch = ''
+    substituteInPlace src/wl-clipboard-x11 \
+      --replace '$(command -v wl-copy)' ${wl-clipboard}/bin/wl-copy \
+      --replace '$(command -v wl-paste)' ${wl-clipboard}/bin/wl-paste
+  '';
+
+  meta = with lib; {
+    description = "A wrapper to use wl-clipboard as a drop-in replacement for X11 clipboard tools";
+    homepage = "https://github.com/brunelli/wl-clipboard-x11";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ samuelgrf ];
+    mainProgram = "xclip";
+  };
+}