forked from mirrors/nixpkgs
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:
parent
2f6c0662ee
commit
985c9dd95c
13
pkgs/tools/misc/ffsend/Cargo.lock.patch
Normal file
13
pkgs/tools/misc/ffsend/Cargo.lock.patch
Normal 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)",
|
|
@ -1,34 +1,41 @@
|
|||
{ stdenv, fetchFromGitLab, rustPlatform, cmake, pkgconfig, openssl
|
||||
, darwin
|
||||
|
||||
, x11Support ? stdenv.isLinux
|
||||
, x11Support ? stdenv.isLinux || stdenv.hostPlatform.isBSD
|
||||
, xclip ? null, xsel ? null
|
||||
, 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;
|
||||
|
||||
buildRustPackage rec {
|
||||
pname = "ffsend";
|
||||
version = "0.2.45";
|
||||
version = "0.2.46";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "timvisee";
|
||||
repo = "ffsend";
|
||||
rev = "v${version}";
|
||||
sha256 = "1rhbpkalbbklbg0bq3xzbqw918ymqjnwhib3agzqd7477hrh1bkr";
|
||||
sha256 = "048kmhy8l2dy7v1b3vzlhcw5qhnz82y1wki6wpd2nz8siyd7dnpi";
|
||||
};
|
||||
|
||||
cargoSha256 = "1218v6rm1j545764g8rkpanwafjzk1c7f5x22v9ivzm0b6lmnm56";
|
||||
cargoSha256 = "09i44vpxbww972zyv393xxwk7wz26cnqzq4gi1mg4703h02jkpjk";
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
buildInputs = [ openssl ]
|
||||
++ 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 ''
|
||||
export XSEL_PATH="${xsel}/bin/xsel"
|
||||
'' else ''
|
||||
|
@ -54,6 +61,6 @@ buildRustPackage rec {
|
|||
homepage = https://gitlab.com/timvisee/ffsend;
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ maintainers.lilyball ];
|
||||
platforms = platforms.darwin ++ platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue