Merge pull request #58328 from lilyball/ffsend

ffsend: 0.2.39 -> 0.2.42
This commit is contained in:
Mario Rodas 2019-04-04 14:06:02 -05:00 committed by GitHub
commit 526ba478a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"