mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
53 lines
1.4 KiB
Nix
53 lines
1.4 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, python3
|
|
, wrapQtAppsHook
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "maestral-qt";
|
|
version = "1.5.1";
|
|
disabled = python3.pkgs.pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "SamSchott";
|
|
repo = "maestral-qt";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-LtKFdNX2/wSs9Hxplu7rz6rc1hoijCGgCKyLjlcRQoI=";
|
|
};
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
click
|
|
markdown2
|
|
maestral
|
|
packaging
|
|
pyqt5
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
importlib-resources
|
|
];
|
|
|
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
|
|
|
makeWrapperArgs = [
|
|
# Firstly, add all necessary QT variables
|
|
"\${qtWrapperArgs[@]}"
|
|
|
|
# Add the installed directories to the python path so the daemon can find them
|
|
"--prefix" "PYTHONPATH" ":" "${lib.concatStringsSep ":" (map (p: p + "/lib/${python3.libPrefix}/site-packages") (python3.pkgs.requiredPythonModules python3.pkgs.maestral.propagatedBuildInputs))}"
|
|
"--prefix" "PYTHONPATH" ":" "${python3.pkgs.maestral}/lib/${python3.libPrefix}/site-packages"
|
|
];
|
|
|
|
# no tests
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "maestral_qt" ];
|
|
|
|
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;
|
|
homepage = "https://maestral.app";
|
|
};
|
|
}
|