2021-02-19 19:06:45 +00:00
|
|
|
{ lib
|
2020-07-18 16:06:22 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-08-12 12:06:08 +00:00
|
|
|
, makePythonPath
|
2020-07-18 16:06:22 +00:00
|
|
|
, pythonOlder
|
|
|
|
, python
|
2022-04-03 18:54:34 +00:00
|
|
|
, click
|
2022-10-06 18:32:54 +00:00
|
|
|
, dbus-python
|
2022-04-03 18:54:34 +00:00
|
|
|
, desktop-notifier
|
|
|
|
, dropbox
|
|
|
|
, fasteners
|
|
|
|
, keyring
|
|
|
|
, keyrings-alt
|
|
|
|
, packaging
|
|
|
|
, pathspec
|
|
|
|
, Pyro5
|
|
|
|
, requests
|
|
|
|
, setuptools
|
|
|
|
, sdnotify
|
|
|
|
, survey
|
|
|
|
, watchdog
|
2020-12-25 13:55:36 +00:00
|
|
|
, importlib-metadata
|
2021-08-25 08:27:29 +00:00
|
|
|
, pytestCheckHook
|
2022-04-03 18:54:34 +00:00
|
|
|
, nixosTests
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "maestral";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.6.3";
|
2020-07-18 16:06:22 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SamSchott";
|
|
|
|
repo = "maestral";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-JVzaWwdHAn5JOruLEN9Z2/5eV1oh3J2NQffNI3RqYfA=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
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
|
|
|
|
keyring
|
|
|
|
keyrings-alt
|
2020-10-11 12:50:04 +00:00
|
|
|
packaging
|
2020-07-18 16:06:22 +00:00
|
|
|
pathspec
|
|
|
|
Pyro5
|
|
|
|
requests
|
2020-10-11 12:50:04 +00:00
|
|
|
setuptools
|
|
|
|
sdnotify
|
2020-12-25 13:55:36 +00:00
|
|
|
survey
|
2020-07-18 16:06:22 +00:00
|
|
|
watchdog
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
2020-12-25 13:55:36 +00:00
|
|
|
importlib-metadata
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
makeWrapperArgs = [
|
|
|
|
# Add the installed directories to the python path so the daemon can find them
|
2022-08-12 12:06:08 +00:00
|
|
|
"--prefix PYTHONPATH : ${makePythonPath propagatedBuildInputs}"
|
|
|
|
"--prefix PYTHONPATH : $out/lib/${python.libPrefix}/site-packages"
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2021-08-25 08:27:29 +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"
|
|
|
|
];
|
|
|
|
|
|
|
|
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";
|
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;
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg sfrijters ];
|
2020-07-18 16:06:22 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|