ffsend: 0.2.45 -> 0.2.46

Extend the xclip/xsel support to all BSD variants and update the
platforms list to `platforms.unix`.
This commit is contained in:
Lily Ballard 2019-05-04 14:36:40 -07:00
parent 2f6c0662ee
commit 985c9dd95c
2 changed files with 27 additions and 7 deletions

View File

@ -0,0 +1,13 @@
diff --git a/Cargo.lock b/Cargo.lock
index 2344bfd..08413d8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -614,7 +614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "ffsend"
-version = "0.2.45"
+version = "0.2.46"
dependencies = [
"chbs 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -1,34 +1,41 @@
{ stdenv, fetchFromGitLab, rustPlatform, cmake, pkgconfig, openssl { stdenv, fetchFromGitLab, rustPlatform, cmake, pkgconfig, openssl
, darwin , darwin
, x11Support ? stdenv.isLinux , x11Support ? stdenv.isLinux || stdenv.hostPlatform.isBSD
, xclip ? null, xsel ? null , xclip ? null, xsel ? null
, preferXsel ? false # if true and xsel is non-null, use it instead of xclip , preferXsel ? false # if true and xsel is non-null, use it instead of xclip
}: }:
assert (x11Support && stdenv.isLinux) -> xclip != null || xsel != null; let
usesX11 = stdenv.isLinux || stdenv.hostPlatform.isBSD;
in
assert (x11Support && usesX11) -> xclip != null || xsel != null;
with rustPlatform; with rustPlatform;
buildRustPackage rec { buildRustPackage rec {
pname = "ffsend"; pname = "ffsend";
version = "0.2.45"; version = "0.2.46";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "timvisee"; owner = "timvisee";
repo = "ffsend"; repo = "ffsend";
rev = "v${version}"; rev = "v${version}";
sha256 = "1rhbpkalbbklbg0bq3xzbqw918ymqjnwhib3agzqd7477hrh1bkr"; sha256 = "048kmhy8l2dy7v1b3vzlhcw5qhnz82y1wki6wpd2nz8siyd7dnpi";
}; };
cargoSha256 = "1218v6rm1j545764g8rkpanwafjzk1c7f5x22v9ivzm0b6lmnm56"; cargoSha256 = "09i44vpxbww972zyv393xxwk7wz26cnqzq4gi1mg4703h02jkpjk";
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 = stdenv.lib.optionalString (x11Support && stdenv.isLinux) ( # Patch for v0.2.45 only
patches = [ ./Cargo.lock.patch ];
preBuild = stdenv.lib.optionalString (x11Support && usesX11) (
if preferXsel && xsel != null then '' if preferXsel && xsel != null then ''
export XSEL_PATH="${xsel}/bin/xsel" export XSEL_PATH="${xsel}/bin/xsel"
'' else '' '' else ''
@ -54,6 +61,6 @@ buildRustPackage rec {
homepage = https://gitlab.com/timvisee/ffsend; homepage = https://gitlab.com/timvisee/ffsend;
license = licenses.gpl3; license = licenses.gpl3;
maintainers = [ maintainers.lilyball ]; maintainers = [ maintainers.lilyball ];
platforms = platforms.darwin ++ platforms.linux; platforms = platforms.unix;
}; };
} }