about summary refs log tree commit diff
path: root/pkgs/applications/networking/maestral
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2019-08-06 12:46:14 +0800
committerPeter Hoeg <peter@hoeg.com>2019-08-14 14:07:12 +0800
commita67aec1746b8780fae3ca357d47010aa10e13fa8 (patch)
tree91fe289d92a94692511fb9e4407259614fce61c5 /pkgs/applications/networking/maestral
parent40e3191a6a0eb955d3f538a146af46ea4db3ee0c (diff)
maestral: init at 0.2.6
Diffstat (limited to 'pkgs/applications/networking/maestral')
-rw-r--r--pkgs/applications/networking/maestral/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/applications/networking/maestral/default.nix b/pkgs/applications/networking/maestral/default.nix
new file mode 100644
index 0000000000000..bfacac2eaf4d0
--- /dev/null
+++ b/pkgs/applications/networking/maestral/default.nix
@@ -0,0 +1,38 @@
+{ lib, python3Packages, fetchFromGitHub
+, withGui ? false, wrapQtAppsHook ? null }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "maestral${lib.optionalString withGui "-gui"}";
+  version = "0.2.6";
+
+  src = fetchFromGitHub {
+    owner = "SamSchott";
+    repo = "maestral-dropbox";
+    rev = "v${version}";
+    sha256 = "1nfjm58f6hnqbx9xnz2h929s2175ka1yf5jjlk4i60v0wppnrrdf";
+  };
+
+  disabled = python3Packages.pythonOlder "3.6";
+
+  propagatedBuildInputs = (with python3Packages; [
+    blinker click dropbox keyring keyrings-alt requests u-msgpack-python watchdog
+  ] ++ lib.optional withGui pyqt5);
+
+  nativeBuildInputs = lib.optional withGui wrapQtAppsHook;
+
+  postInstall = lib.optionalString withGui ''
+    makeQtWrapper $out/bin/maestral $out/bin/maestral-gui \
+      --add-flags gui
+  '';
+
+  # no tests
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Open-source Dropbox client for macOS and Linux";
+    license = licenses.mit;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms = platforms.unix;
+    inherit (src.meta) homepage;
+  };
+}