2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
makePythonPath,
|
|
|
|
pythonOlder,
|
|
|
|
python,
|
|
|
|
click,
|
|
|
|
dbus-python,
|
|
|
|
desktop-notifier,
|
|
|
|
dropbox,
|
|
|
|
fasteners,
|
|
|
|
importlib-metadata,
|
|
|
|
keyring,
|
|
|
|
keyrings-alt,
|
|
|
|
packaging,
|
|
|
|
pathspec,
|
|
|
|
pyro5,
|
|
|
|
requests,
|
|
|
|
rich,
|
|
|
|
rubicon-objc,
|
|
|
|
setuptools,
|
|
|
|
survey,
|
|
|
|
typing-extensions,
|
|
|
|
watchdog,
|
|
|
|
xattr,
|
|
|
|
fetchpatch,
|
|
|
|
pytestCheckHook,
|
|
|
|
nixosTests,
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "maestral";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.9.4";
|
2024-06-05 15:53:02 +00:00
|
|
|
pyproject = true;
|
2022-12-02 08:20:57 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SamSchott";
|
|
|
|
repo = "maestral";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-akh0COltpUU4Z4kfubg6A7k6W8ICoqVYkmFpMkTC8H8=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2020-07-18 16:06:22 +00:00
|
|
|
click
|
2021-02-19 19:06:45 +00:00
|
|
|
desktop-notifier
|
2022-10-06 18:32:54 +00:00
|
|
|
dbus-python
|
2020-07-18 16:06:22 +00:00
|
|
|
dropbox
|
|
|
|
fasteners
|
2023-01-11 07:51:40 +00:00
|
|
|
importlib-metadata
|
2020-07-18 16:06:22 +00:00
|
|
|
keyring
|
|
|
|
keyrings-alt
|
2020-10-11 12:50:04 +00:00
|
|
|
packaging
|
2020-07-18 16:06:22 +00:00
|
|
|
pathspec
|
2023-03-15 16:39:30 +00:00
|
|
|
pyro5
|
2020-07-18 16:06:22 +00:00
|
|
|
requests
|
2023-01-11 07:51:40 +00:00
|
|
|
rich
|
2020-10-11 12:50:04 +00:00
|
|
|
setuptools
|
2020-12-25 13:55:36 +00:00
|
|
|
survey
|
2023-01-11 07:51:40 +00:00
|
|
|
typing-extensions
|
2020-07-18 16:06:22 +00:00
|
|
|
watchdog
|
2024-04-21 15:54:59 +00:00
|
|
|
xattr
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ rubicon-objc ];
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
makeWrapperArgs = [
|
|
|
|
# Add the installed directories to the python path so the daemon can find them
|
2024-06-05 15:53:02 +00:00
|
|
|
"--prefix PYTHONPATH : ${makePythonPath dependencies}"
|
2024-02-07 01:22:34 +00:00
|
|
|
"--prefix PYTHONPATH : $out/${python.sitePackages}"
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-08-25 08:27:29 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
# ModuleNotFoundError: No module named '_watchdog_fsevents'
|
|
|
|
doCheck = !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64);
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# We don't want to benchmark
|
|
|
|
"test_performance"
|
|
|
|
# Requires systemd
|
|
|
|
"test_autostart"
|
|
|
|
# Requires network access
|
|
|
|
"test_check_for_updates"
|
|
|
|
# Tries to look at /usr
|
|
|
|
"test_filestatus"
|
|
|
|
"test_path_exists_case_insensitive"
|
|
|
|
"test_cased_path_candidates"
|
|
|
|
# AssertionError
|
|
|
|
"test_locking_multiprocess"
|
|
|
|
# OSError: [Errno 95] Operation not supported
|
|
|
|
"test_move_preserves_xattrs"
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
# maetral daemon does not start but worked in real environment
|
|
|
|
"test_catching_non_ignored_events"
|
|
|
|
"test_connection"
|
|
|
|
"test_event_handler"
|
|
|
|
"test_fs_ignore_tree_creation"
|
|
|
|
"test_lifecycle"
|
|
|
|
"test_notify_level"
|
|
|
|
"test_notify_snooze"
|
|
|
|
"test_receiving_events"
|
|
|
|
"test_remote_exceptions"
|
|
|
|
"test_start_already_running"
|
|
|
|
"test_stop"
|
|
|
|
];
|
2021-08-25 08:27:29 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "maestral" ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
passthru.tests.maestral = nixosTests.maestral;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-07-18 16:06:22 +00:00
|
|
|
description = "Open-source Dropbox client for macOS and Linux";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "maestral";
|
2022-11-27 09:42:12 +00:00
|
|
|
homepage = "https://maestral.app";
|
|
|
|
changelog = "https://github.com/samschott/maestral/releases/tag/v${version}";
|
2020-07-18 16:06:22 +00:00
|
|
|
license = licenses.mit;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
natsukium
|
|
|
|
peterhoeg
|
|
|
|
sfrijters
|
|
|
|
];
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
}
|