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.
This commit is contained in:
Lily Ballard 2019-03-25 21:09:42 -07:00
parent a620334527
commit da484caf1c

View File

@ -2,34 +2,39 @@
, darwin , darwin
, x11Support ? stdenv.isLinux , 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; with rustPlatform;
buildRustPackage rec { buildRustPackage rec {
name = "ffsend-${version}"; name = "ffsend-${version}";
version = "0.2.39"; version = "0.2.42";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "timvisee"; owner = "timvisee";
repo = "ffsend"; repo = "ffsend";
rev = "v${version}"; rev = "v${version}";
sha256 = "0109g2h8673q6kx1lbci59zg9iczj676fvbip3sf1xfypvca22j9"; sha256 = "0lsdn967rq6hf3fmkynznsvj8fcka5wi1mpcl3wfa7hf58r266yq";
}; };
cargoSha256 = "0yf9zfilj2whhnmbvh8p8vz4gkd8ds21gshylwp4ykqwv5p59nqq"; cargoSha256 = "1f1npdr8v9vlv3xdraq1qang4l0j0w9slbws4da5ylw195nb4qx5";
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ openssl ] buildInputs = [ openssl ]
++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices Security AppKit ]) ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices Security AppKit ])
; ;
preBuild = if x11Support then '' preBuild = stdenv.lib.optionalString (x11Support && stdenv.isLinux) (
export XCLIP_PATH="${xclip}/bin/xclip" if preferXsel && xsel != null then ''
'' else null; export XSEL_PATH="${xsel}/bin/xsel"
'' else ''
export XCLIP_PATH="${xclip}/bin/xclip"
''
);
postInstall = '' postInstall = ''
install -Dm644 contrib/completions/_ffsend "$out/share/zsh/site-functions/_ffsend" install -Dm644 contrib/completions/_ffsend "$out/share/zsh/site-functions/_ffsend"