2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-06-28 23:13:55 +00:00
|
|
|
, python3Packages
|
2021-02-05 17:12:51 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, wrapQtAppsHook
|
2021-05-20 23:08:51 +00:00
|
|
|
, borgbackup
|
2024-04-21 15:54:59 +00:00
|
|
|
, qtbase
|
|
|
|
, qtwayland
|
2023-08-04 22:07:22 +00:00
|
|
|
, stdenv
|
2024-04-21 15:54:59 +00:00
|
|
|
, makeFontsConf
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "vorta";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.9.1";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "borgbase";
|
|
|
|
repo = "vorta";
|
2023-04-29 16:46:19 +00:00
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-wGlnldS2p92NAYAyRPqKjSneIlbdsOiJ0N42n/mMGFI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3Packages.setuptools
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [
|
2024-04-21 15:54:59 +00:00
|
|
|
qtwayland
|
2023-08-04 22:07:22 +00:00
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
peewee
|
2024-04-21 15:54:59 +00:00
|
|
|
pyqt6
|
2021-06-28 23:13:55 +00:00
|
|
|
psutil
|
|
|
|
secretstorage
|
|
|
|
setuptools
|
2023-04-29 16:46:19 +00:00
|
|
|
platformdirs
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/vorta/assets/metadata/com.borgbase.Vorta.desktop \
|
|
|
|
--replace com.borgbase.Vorta "com.borgbase.Vorta-symbolic"
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 src/vorta/assets/metadata/com.borgbase.Vorta.desktop $out/share/applications/com.borgbase.Vorta.desktop
|
2023-05-24 13:37:59 +00:00
|
|
|
install -Dm644 src/vorta/assets/icons/icon.svg $out/share/pixmaps/com.borgbase.Vorta-symbolic.svg
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
preFixup = ''
|
2021-05-20 23:08:51 +00:00
|
|
|
makeWrapperArgs+=(
|
|
|
|
"''${qtWrapperArgs[@]}"
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ borgbackup ]}
|
|
|
|
)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with python3Packages; [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytest-qt
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
preCheck = let
|
|
|
|
fontsConf = makeFontsConf {
|
|
|
|
fontDirectories = [ ];
|
|
|
|
};
|
|
|
|
in ''
|
2021-06-28 23:13:55 +00:00
|
|
|
export HOME=$(mktemp -d)
|
2024-04-21 15:54:59 +00:00
|
|
|
export FONTCONFIG_FILE=${fontsConf};
|
2021-06-28 23:13:55 +00:00
|
|
|
# For tests/test_misc.py::test_autostart
|
|
|
|
mkdir -p $HOME/.config/autostart
|
2024-04-21 15:54:59 +00:00
|
|
|
export QT_PLUGIN_PATH="${qtbase}/${qtbase.qtPluginPrefix}"
|
2021-06-28 23:13:55 +00:00
|
|
|
export QT_QPA_PLATFORM=offscreen
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
2024-04-21 15:54:59 +00:00
|
|
|
# QObject::connect: No such signal QPlatformNativeInterface::systemTrayWindowChanged(QScreen*)
|
|
|
|
"tests/test_excludes.py"
|
|
|
|
"tests/integration"
|
|
|
|
"tests/unit"
|
2021-06-28 23:13:55 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/borgbase/vorta/releases/tag/${src.rev}";
|
2023-02-02 18:25:31 +00:00
|
|
|
description = "Desktop Backup Client for Borg";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://vorta.borgbase.com/";
|
2023-02-02 18:25:31 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "vorta";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|