nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 128 lines 2.8 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 makePythonPath, 7 python, 8 click, 9 dbus-python, 10 desktop-notifier, 11 dropbox, 12 fasteners, 13 importlib-metadata, 14 keyring, 15 keyrings-alt, 16 packaging, 17 pathspec, 18 pyro5, 19 requests, 20 rich, 21 rubicon-objc, 22 setuptools, 23 survey, 24 typing-extensions, 25 watchdog, 26 xattr, 27 pytestCheckHook, 28 nixosTests, 29}: 30 31buildPythonPackage rec { 32 pname = "maestral"; 33 version = "1.9.6"; 34 pyproject = true; 35 36 src = fetchFromGitHub { 37 owner = "SamSchott"; 38 repo = "maestral"; 39 tag = "v${version}"; 40 hash = "sha256-mYFiQL4FumJWP2y1u5tIo1CZL027J8/EIYqJQde7G/c="; 41 }; 42 43 build-system = [ setuptools ]; 44 45 dependencies = [ 46 click 47 desktop-notifier 48 dbus-python 49 dropbox 50 fasteners 51 keyring 52 keyrings-alt 53 packaging 54 pathspec 55 pyro5 56 requests 57 rich 58 setuptools 59 survey 60 typing-extensions 61 watchdog 62 xattr 63 ] 64 ++ lib.optionals stdenv.hostPlatform.isDarwin [ rubicon-objc ]; 65 66 makeWrapperArgs = [ 67 # Add the installed directories to the python path so the daemon can find them 68 "--prefix PYTHONPATH : ${makePythonPath dependencies}" 69 "--prefix PYTHONPATH : $out/${python.sitePackages}" 70 ]; 71 72 nativeCheckInputs = [ pytestCheckHook ]; 73 74 # ModuleNotFoundError: No module named '_watchdog_fsevents' 75 doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64); 76 77 preCheck = '' 78 export HOME=$(mktemp -d) 79 ''; 80 81 disabledTests = [ 82 # We don't want to benchmark 83 "test_performance" 84 # Requires systemd 85 "test_autostart" 86 # Requires network access 87 "test_check_for_updates" 88 # Tries to look at /usr 89 "test_filestatus" 90 "test_path_exists_case_insensitive" 91 "test_cased_path_candidates" 92 # AssertionError 93 "test_locking_multiprocess" 94 # OSError: [Errno 95] Operation not supported 95 "test_move_preserves_xattrs" 96 ] 97 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 98 # maetral daemon does not start but worked in real environment 99 "test_catching_non_ignored_events" 100 "test_connection" 101 "test_event_handler" 102 "test_fs_ignore_tree_creation" 103 "test_lifecycle" 104 "test_notify_level" 105 "test_notify_snooze" 106 "test_receiving_events" 107 "test_remote_exceptions" 108 "test_start_already_running" 109 "test_stop" 110 ]; 111 112 pythonImportsCheck = [ "maestral" ]; 113 114 passthru.tests.maestral = nixosTests.maestral; 115 116 meta = { 117 description = "Open-source Dropbox client for macOS and Linux"; 118 mainProgram = "maestral"; 119 homepage = "https://maestral.app"; 120 changelog = "https://github.com/samschott/maestral/releases/tag/v${version}"; 121 license = lib.licenses.mit; 122 maintainers = with lib.maintainers; [ 123 natsukium 124 peterhoeg 125 sfrijters 126 ]; 127 }; 128}