summary refs log tree commit diff
path: root/pkgs/tools/misc/ffsend
diff options
context:
space:
mode:
authorLily Ballard <lily@sb.org>2019-03-25 21:09:42 -0700
committerLily Ballard <lily@sb.org>2019-03-25 21:09:42 -0700
commitda484caf1c79aa96389e6d453c9268554706f91b (patch)
tree6abb4a4ae52af10629269863324ad1dc8fa57a32 /pkgs/tools/misc/ffsend
parenta62033452796e7e0565450cf7733b748b008c8d7 (diff)
downloadnixpkgs-da484caf1c79aa96389e6d453c9268554706f91b.tar
nixpkgs-da484caf1c79aa96389e6d453c9268554706f91b.tar.gz
nixpkgs-da484caf1c79aa96389e6d453c9268554706f91b.tar.bz2
nixpkgs-da484caf1c79aa96389e6d453c9268554706f91b.tar.lz
nixpkgs-da484caf1c79aa96389e6d453c9268554706f91b.tar.xz
nixpkgs-da484caf1c79aa96389e6d453c9268554706f91b.tar.zst
nixpkgs-da484caf1c79aa96389e6d453c9268554706f91b.zip
ffsend: 0.2.39 -> 0.2.42
https://github.com/timvisee/ffsend/releases/tag/v0.2.42

Add support for `xsel` instead of `xclip` on Linux.
Diffstat (limited to 'pkgs/tools/misc/ffsend')
-rw-r--r--pkgs/tools/misc/ffsend/default.nix21
1 files changed, 13 insertions, 8 deletions
diff --git a/pkgs/tools/misc/ffsend/default.nix b/pkgs/tools/misc/ffsend/default.nix
index 0ba3472ae70..c59ddd08498 100644
--- a/pkgs/tools/misc/ffsend/default.nix
+++ b/pkgs/tools/misc/ffsend/default.nix
@@ -2,34 +2,39 @@
 , darwin
 
 , x11Support ? stdenv.isLinux
-, xclip ? null
+, xclip ? null, xsel ? null
+, preferXsel ? false # if true and xsel is non-null, use it instead of xclip
 }:
 
-assert x11Support -> xclip != null;
+assert (x11Support && stdenv.isLinux) -> xclip != null || xsel != null;
 
 with rustPlatform;
 
 buildRustPackage rec {
   name = "ffsend-${version}";
-  version = "0.2.39";
+  version = "0.2.42";
 
   src = fetchFromGitLab {
     owner = "timvisee";
     repo = "ffsend";
     rev = "v${version}";
-    sha256 = "0109g2h8673q6kx1lbci59zg9iczj676fvbip3sf1xfypvca22j9";
+    sha256 = "0lsdn967rq6hf3fmkynznsvj8fcka5wi1mpcl3wfa7hf58r266yq";
   };
 
-  cargoSha256 = "0yf9zfilj2whhnmbvh8p8vz4gkd8ds21gshylwp4ykqwv5p59nqq";
+  cargoSha256 = "1f1npdr8v9vlv3xdraq1qang4l0j0w9slbws4da5ylw195nb4qx5";
 
   nativeBuildInputs = [ cmake pkgconfig ];
   buildInputs = [ openssl ]
   ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices Security AppKit ])
   ;
 
-  preBuild = if x11Support then ''
-    export XCLIP_PATH="${xclip}/bin/xclip"
-  '' else null;
+  preBuild = stdenv.lib.optionalString (x11Support && stdenv.isLinux) (
+    if preferXsel && xsel != null then ''
+      export XSEL_PATH="${xsel}/bin/xsel"
+    '' else ''
+      export XCLIP_PATH="${xclip}/bin/xclip"
+    ''
+  );
 
   postInstall = ''
     install -Dm644 contrib/completions/_ffsend "$out/share/zsh/site-functions/_ffsend"