2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-07-18 16:06:22 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
, wrapQtAppsHook
|
2022-04-03 18:54:34 +00:00
|
|
|
, nixosTests
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
let
|
|
|
|
inherit (pypkgs) makePythonPath;
|
|
|
|
|
|
|
|
pypkgs = (python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
# Use last available version of maestral that still supports PyQt5
|
|
|
|
# Remove this override when PyQt6 is available
|
|
|
|
maestral = super.maestral.overridePythonAttrs (old: rec {
|
|
|
|
version = "1.5.3";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SamSchott";
|
|
|
|
repo = "maestral";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-Uo3vcYez2qSq162SSKjoCkwygwR5awzDceIq8/h3dao=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}).pkgs;
|
|
|
|
|
|
|
|
in
|
|
|
|
pypkgs.buildPythonApplication rec {
|
2020-07-18 16:06:22 +00:00
|
|
|
pname = "maestral-qt";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "1.5.3";
|
2022-08-12 12:06:08 +00:00
|
|
|
disabled = pypkgs.pythonOlder "3.6";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SamSchott";
|
|
|
|
repo = "maestral-qt";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-zaG9Zwz9S/SVb7xDa7eXkjLNt1BhA1cQ3I18rVt+8uQ=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
propagatedBuildInputs = with pypkgs; [
|
2020-07-18 16:06:22 +00:00
|
|
|
click
|
|
|
|
markdown2
|
|
|
|
maestral
|
2020-10-11 12:50:04 +00:00
|
|
|
packaging
|
2020-07-18 16:06:22 +00:00
|
|
|
pyqt5
|
2021-01-15 22:18:51 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
2020-12-25 13:55:36 +00:00
|
|
|
importlib-resources
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
|
|
|
|
|
|
|
makeWrapperArgs = [
|
|
|
|
# Firstly, add all necessary QT variables
|
|
|
|
"\${qtWrapperArgs[@]}"
|
|
|
|
|
|
|
|
# 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 (pypkgs.requiredPythonModules pypkgs.maestral.propagatedBuildInputs)}"
|
|
|
|
"--prefix PYTHONPATH : ${makePythonPath [ pypkgs.maestral ]}"
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
pythonImportsCheck = [ "maestral_qt" ];
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
passthru.tests.maestral = nixosTests.maestral;
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "GUI front-end for maestral (an open-source Dropbox client) for Linux";
|
|
|
|
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.linux;
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://maestral.app";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
}
|