summary refs log tree commit diff
path: root/pkgs/tools/misc/ffsend
diff options
context:
space:
mode:
authorLily Ballard <lily@sb.org>2019-03-16 20:27:17 -0700
committerLily Ballard <lily@sb.org>2019-03-17 18:52:25 -0700
commit11cdd00138e9ef777263a74b840d5f2a2d6a4e2d (patch)
treed8d42abe15ae24b17f1553296aef62c0d3c16d83 /pkgs/tools/misc/ffsend
parentdb4f3b174429adb4a96fe0003f74fe9a6f0e5d1f (diff)
downloadnixpkgs-11cdd00138e9ef777263a74b840d5f2a2d6a4e2d.tar
nixpkgs-11cdd00138e9ef777263a74b840d5f2a2d6a4e2d.tar.gz
nixpkgs-11cdd00138e9ef777263a74b840d5f2a2d6a4e2d.tar.bz2
nixpkgs-11cdd00138e9ef777263a74b840d5f2a2d6a4e2d.tar.lz
nixpkgs-11cdd00138e9ef777263a74b840d5f2a2d6a4e2d.tar.xz
nixpkgs-11cdd00138e9ef777263a74b840d5f2a2d6a4e2d.tar.zst
nixpkgs-11cdd00138e9ef777263a74b840d5f2a2d6a4e2d.zip
ffsend: init at 0.2.36
Diffstat (limited to 'pkgs/tools/misc/ffsend')
-rw-r--r--pkgs/tools/misc/ffsend/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/tools/misc/ffsend/default.nix b/pkgs/tools/misc/ffsend/default.nix
new file mode 100644
index 00000000000..dba608f41af
--- /dev/null
+++ b/pkgs/tools/misc/ffsend/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchFromGitLab, rustPlatform, cmake, pkgconfig, openssl
+, darwin
+}:
+
+with rustPlatform;
+
+buildRustPackage rec {
+  name = "ffsend-${version}";
+  version = "0.2.36";
+
+  src = fetchFromGitLab {
+    owner = "timvisee";
+    repo = "ffsend";
+    rev = "v${version}";
+    sha256 = "0k2sl1f5isxj8qajmhf36xh6k9j9qq7nkqm27wfm3gvc6b4flk0r";
+  };
+
+  cargoSha256 = "1l4060kawba56gxsngba2yjshhaygrs17k1msjbj38vrg07zrnbp";
+
+  # Note: On Linux, the clipboard feature requires `xclip` to be in the `PATH`. Ideally we'd
+  # depend on `xclip` and patch the source to run `xclip` from the Nix store instead of from `PATH`.
+  # However, as I use macOS and not Linux, I'm not inclined to maintain a patch like that, nor do I
+  # have a means to test it. To that end, we'll just leave the clipboard feature enabled and
+  # trust that users that want to copy links to their clipboard will install `xclip` into their
+  # profile.
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+  buildInputs = [ openssl ]
+  ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation CoreServices Security AppKit ])
+  ;
+
+  postInstall = ''
+    mkdir -p $out/share/zsh/site-functions
+    cp contrib/completions/zsh/_ffsend $out/share/zsh/site-functions/_ffsend
+  '';
+
+  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;
+  };
+}