diff options
Diffstat (limited to 'pkgs/tools/misc/ffsend/default.nix')
-rw-r--r-- | pkgs/tools/misc/ffsend/default.nix | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/pkgs/tools/misc/ffsend/default.nix b/pkgs/tools/misc/ffsend/default.nix index 9eaba1e8d3f..2eca6de7b61 100644 --- a/pkgs/tools/misc/ffsend/default.nix +++ b/pkgs/tools/misc/ffsend/default.nix @@ -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; }; } |