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:
parent
a620334527
commit
da484caf1c
1 changed files with 13 additions and 8 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue