mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
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
|
{ 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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user