1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, makePythonPath 5, pythonOlder 6, python 7, click 8, dbus-python 9, desktop-notifier 10, dropbox 11, fasteners 12, keyring 13, keyrings-alt 14, packaging 15, pathspec 16, Pyro5 17, requests 18, setuptools 19, sdnotify 20, survey 21, watchdog 22, importlib-metadata 23, pytestCheckHook 24, nixosTests 25}: 26 27buildPythonPackage rec { 28 pname = "maestral"; 29 version = "1.6.3"; 30 disabled = pythonOlder "3.6"; 31 32 src = fetchFromGitHub { 33 owner = "SamSchott"; 34 repo = "maestral"; 35 rev = "refs/tags/v${version}"; 36 sha256 = "sha256-JVzaWwdHAn5JOruLEN9Z2/5eV1oh3J2NQffNI3RqYfA="; 37 }; 38 39 format = "pyproject"; 40 41 propagatedBuildInputs = [ 42 click 43 desktop-notifier 44 dbus-python 45 dropbox 46 fasteners 47 keyring 48 keyrings-alt 49 packaging 50 pathspec 51 Pyro5 52 requests 53 setuptools 54 sdnotify 55 survey 56 watchdog 57 ] ++ lib.optionals (pythonOlder "3.8") [ 58 importlib-metadata 59 ]; 60 61 makeWrapperArgs = [ 62 # Add the installed directories to the python path so the daemon can find them 63 "--prefix PYTHONPATH : ${makePythonPath propagatedBuildInputs}" 64 "--prefix PYTHONPATH : $out/lib/${python.libPrefix}/site-packages" 65 ]; 66 67 checkInputs = [ 68 pytestCheckHook 69 ]; 70 71 preCheck = '' 72 export HOME=$(mktemp -d) 73 ''; 74 75 disabledTests = [ 76 # We don't want to benchmark 77 "test_performance" 78 # Requires systemd 79 "test_autostart" 80 # Requires network access 81 "test_check_for_updates" 82 # Tries to look at /usr 83 "test_filestatus" 84 "test_path_exists_case_insensitive" 85 "test_cased_path_candidates" 86 ]; 87 88 pythonImportsCheck = [ "maestral" ]; 89 90 passthru.tests.maestral = nixosTests.maestral; 91 92 meta = with lib; { 93 description = "Open-source Dropbox client for macOS and Linux"; 94 license = licenses.mit; 95 maintainers = with maintainers; [ peterhoeg sfrijters ]; 96 platforms = platforms.unix; 97 homepage = "https://maestral.app"; 98 }; 99}