nixpkgs/pkgs/applications/networking/maestral-qt/default.nix

51 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
2020-06-16 10:46:10 -07:00
, fetchFromGitHub
, python3
, wrapQtAppsHook
}:
python3.pkgs.buildPythonApplication rec {
pname = "maestral-qt";
2021-03-15 12:52:01 -07:00
version = "1.4.3";
2020-06-16 10:46:10 -07:00
disabled = python3.pkgs.pythonOlder "3.6";
src = fetchFromGitHub {
owner = "SamSchott";
repo = "maestral-qt";
rev = "v${version}";
2021-03-15 12:52:01 -07:00
sha256 = "sha256-+eBwBZx+kp2ACbFjtYK6ux9lcPmEQsunvxAAZ2HgAYw=";
2020-06-16 10:46:10 -07:00
};
propagatedBuildInputs = with python3.pkgs; [
click
markdown2
maestral
2020-10-08 15:45:08 -07:00
packaging
2020-06-16 10:46:10 -07:00
pyqt5
2021-01-14 21:42:41 -08:00
] ++ lib.optionals (pythonOlder "3.9") [
2020-12-08 07:32:04 -08:00
importlib-resources
2020-06-16 10:46:10 -07: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
2021-01-14 21:42:41 -08:00
"--prefix" "PYTHONPATH" ":" "${lib.concatStringsSep ":" (map (p: p + "/lib/${python3.libPrefix}/site-packages") (python3.pkgs.requiredPythonModules python3.pkgs.maestral.propagatedBuildInputs))}"
2020-06-16 10:46:10 -07:00
"--prefix" "PYTHONPATH" ":" "${python3.pkgs.maestral}/lib/${python3.libPrefix}/site-packages"
];
# no tests
doCheck = false;
meta = with lib; {
description = "GUI front-end for maestral (an open-source Dropbox client) for Linux";
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
inherit (src.meta) homepage;
};
}