nixpkgs/pkgs/tools/misc/ffsend/default.nix

55 lines
1.8 KiB
Nix
Raw Normal View History

2019-03-17 03:27:17 +00:00
{ stdenv, fetchFromGitLab, rustPlatform, cmake, pkgconfig, openssl
, darwin
, x11Support ? stdenv.isLinux
, xclip ? null
2019-03-17 03:27:17 +00:00
}:
assert x11Support -> xclip != null;
2019-03-17 03:27:17 +00:00
with rustPlatform;
buildRustPackage rec {
name = "ffsend-${version}";
version = "0.2.39";
2019-03-17 03:27:17 +00:00
src = fetchFromGitLab {
owner = "timvisee";
repo = "ffsend";
rev = "v${version}";
sha256 = "0109g2h8673q6kx1lbci59zg9iczj676fvbip3sf1xfypvca22j9";
2019-03-17 03:27:17 +00:00
};
cargoSha256 = "0yf9zfilj2whhnmbvh8p8vz4gkd8ds21gshylwp4ykqwv5p59nqq";
2019-03-17 03:27:17 +00:00
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;
2019-03-17 03:27:17 +00:00
postInstall = ''
install -Dm644 contrib/completions/_ffsend "$out/share/zsh/site-functions/_ffsend"
install -Dm644 contrib/completions/ffsend.bash "$out/share/bash-completion/completions/ffsend.bash"
install -Dm644 contrib/completions/ffsend.fish "$out/share/fish/vendor_completions.d/ffsend.fish"
2019-03-17 03:27:17 +00:00
'';
# There's also .elv and .ps1 completion files but I don't know where to install those
2019-03-17 03:27:17 +00:00
meta = with stdenv.lib; {
description = "Easily and securely share files from the command line. A fully featured Firefox Send client";
longDescription = ''
Easily and securely share files and directories from the command line through a safe, private
and encrypted link using a single simple command. Files are shared using the Send service and
may be up to 2GB. Others are able to download these files with this tool, or through their
web browser.
'';
homepage = https://gitlab.com/timvisee/ffsend;
license = licenses.gpl3;
maintainers = [ maintainers.lilyball ];
platforms = platforms.darwin ++ platforms.linux;
};
}