1{
2 lib,
3 fetchFromGitHub,
4 python3,
5 qtbase,
6 qtsvg,
7 qtwayland,
8 nixosTests,
9 wrapQtAppsHook,
10}:
11
12python3.pkgs.buildPythonApplication rec {
13 pname = "maestral-qt";
14 version = "1.9.4";
15 pyproject = true;
16
17 disabled = python3.pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "SamSchott";
21 repo = "maestral-qt";
22 tag = "v${version}";
23 hash = "sha256-VkJOKKYnoXux3WjD1JwINGWwv1SMIXfidyV2ITE7dJc=";
24 };
25
26 build-system = with python3.pkgs; [ setuptools ];
27
28 dependencies = with python3.pkgs; [
29 click
30 markdown2
31 maestral
32 packaging
33 pyqt6
34 ];
35
36 buildInputs = [
37 qtwayland
38 qtbase
39 qtsvg # Needed for the systray icon
40 ];
41
42 nativeBuildInputs = [ wrapQtAppsHook ];
43
44 dontWrapQtApps = true;
45
46 makeWrapperArgs = with python3.pkgs; [
47 # Firstly, add all necessary QT variables
48 "\${qtWrapperArgs[@]}"
49
50 # Add the installed directories to the python path so the daemon can find them
51 "--prefix PYTHONPATH : ${makePythonPath (requiredPythonModules maestral.propagatedBuildInputs)}"
52 "--prefix PYTHONPATH : ${makePythonPath [ maestral ]}"
53 ];
54
55 # no tests
56 doCheck = false;
57
58 pythonImportsCheck = [ "maestral_qt" ];
59
60 passthru.tests.maestral = nixosTests.maestral;
61
62 meta = {
63 description = "GUI front-end for maestral (an open-source Dropbox client) for Linux";
64 homepage = "https://maestral.app";
65 changelog = "https://github.com/samschott/maestral/releases/tag/v${version}";
66 license = lib.licenses.mit;
67 maintainers = with lib.maintainers; [
68 peterhoeg
69 sfrijters
70 ];
71 platforms = lib.platforms.linux;
72 mainProgram = "maestral_qt";
73 };
74}