1{ stdenv
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, python
6, blinker, bugsnag, click, dropbox, fasteners, keyring, keyrings-alt, pathspec, Pyro5, requests, u-msgpack-python, watchdog
7, sdnotify
8, systemd
9}:
10
11buildPythonPackage rec {
12 pname = "maestral";
13 version = "1.1.0";
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 owner = "SamSchott";
18 repo = "maestral";
19 rev = "v${version}";
20 sha256 = "0d1pxbg69ll07w4bbpzs7zz1yn82qyrym95b0mqmhrrg2ysxjngg";
21 };
22
23 propagatedBuildInputs = [
24 blinker
25 bugsnag
26 click
27 dropbox
28 fasteners
29 keyring
30 keyrings-alt
31 pathspec
32 Pyro5
33 requests
34 u-msgpack-python
35 watchdog
36 ] ++ stdenv.lib.optionals stdenv.isLinux [
37 sdnotify
38 systemd
39 ];
40
41 makeWrapperArgs = [
42 # Add the installed directories to the python path so the daemon can find them
43 "--prefix" "PYTHONPATH" ":" "${stdenv.lib.concatStringsSep ":" (map (p: p + "/lib/${python.libPrefix}/site-packages") (python.pkgs.requiredPythonModules propagatedBuildInputs))}"
44 "--prefix" "PYTHONPATH" ":" "$out/lib/${python.libPrefix}/site-packages"
45 ];
46
47 # no tests
48 doCheck = false;
49
50 meta = with stdenv.lib; {
51 description = "Open-source Dropbox client for macOS and Linux";
52 license = licenses.mit;
53 maintainers = with maintainers; [ peterhoeg ];
54 platforms = platforms.unix;
55 inherit (src.meta) homepage;
56 };
57}