1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, python
6, click, desktop-notifier, dropbox, fasteners, keyring, keyrings-alt, packaging, pathspec, Pyro5, requests, setuptools, sdnotify, survey, watchdog
7, importlib-metadata
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "maestral";
13 version = "1.5.1";
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 owner = "SamSchott";
18 repo = "maestral";
19 rev = "v${version}";
20 sha256 = "sha256-R6zacpJkSWppodrb0SD4lglFmGVtPaloeDMBPL+ztuU=";
21 };
22
23 propagatedBuildInputs = [
24 click
25 desktop-notifier
26 dropbox
27 fasteners
28 keyring
29 keyrings-alt
30 packaging
31 pathspec
32 Pyro5
33 requests
34 setuptools
35 sdnotify
36 survey
37 watchdog
38 ] ++ lib.optionals (pythonOlder "3.8") [
39 importlib-metadata
40 ];
41
42 makeWrapperArgs = [
43 # Add the installed directories to the python path so the daemon can find them
44 "--prefix" "PYTHONPATH" ":" "${lib.concatStringsSep ":" (map (p: p + "/lib/${python.libPrefix}/site-packages") (python.pkgs.requiredPythonModules propagatedBuildInputs))}"
45 "--prefix" "PYTHONPATH" ":" "$out/lib/${python.libPrefix}/site-packages"
46 ];
47
48 checkInputs = [
49 pytestCheckHook
50 ];
51
52 disabledTests = [
53 # We don't want to benchmark
54 "test_performance"
55 # Requires systemd
56 "test_autostart"
57 # Requires network access
58 "test_check_for_updates"
59 # Tries to look at /usr
60 "test_filestatus"
61 "test_path_exists_case_insensitive"
62 "test_cased_path_candidates"
63 ];
64
65 pythonImportsCheck = [ "maestral" ];
66
67 meta = with lib; {
68 description = "Open-source Dropbox client for macOS and Linux";
69 license = licenses.mit;
70 maintainers = with maintainers; [ peterhoeg ];
71 platforms = platforms.unix;
72 homepage = "https://maestral.app";
73 };
74}