2021-01-31 09:56:45 +00:00
|
|
|
{ lib
|
2021-06-24 00:26:45 +01:00
|
|
|
, python3Packages
|
2021-01-31 09:56:45 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, wrapQtAppsHook
|
2021-05-07 12:22:55 +01:00
|
|
|
, borgbackup
|
2021-06-24 00:26:45 +01:00
|
|
|
, qt5
|
2020-03-28 21:32:34 +00:00
|
|
|
}:
|
|
|
|
|
2021-06-24 00:26:45 +01:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-03-28 21:32:34 +00:00
|
|
|
pname = "vorta";
|
2022-06-18 16:41:27 +01:00
|
|
|
version = "0.8.7";
|
2020-03-28 21:32:34 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "borgbase";
|
|
|
|
repo = "vorta";
|
2022-05-07 17:24:19 +01:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-06-18 16:41:27 +01:00
|
|
|
sha256 = "sha256-9SfHZbNM+lRtwLO/0dE9C4cHb3pSPkxBUITYNEdPMQw=";
|
2020-03-28 21:32:34 +00:00
|
|
|
};
|
|
|
|
|
2021-01-31 09:56:45 +00:00
|
|
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
2020-03-28 21:32:34 +00:00
|
|
|
|
2021-06-24 00:26:45 +01:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
paramiko
|
|
|
|
peewee
|
|
|
|
pyqt5
|
|
|
|
python-dateutil
|
|
|
|
psutil
|
|
|
|
qdarkstyle
|
|
|
|
secretstorage
|
|
|
|
appdirs
|
|
|
|
setuptools
|
2020-03-28 21:32:34 +00:00
|
|
|
];
|
|
|
|
|
2021-06-24 00:26:45 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace setuptools_git "" \
|
|
|
|
--replace pytest-runner ""
|
|
|
|
|
|
|
|
substituteInPlace src/vorta/assets/metadata/com.borgbase.Vorta.desktop \
|
|
|
|
--replace Exec=vorta "Exec=$out/bin/vorta" \
|
|
|
|
--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
|
|
|
|
'';
|
2020-03-28 21:32:34 +00:00
|
|
|
|
2020-10-08 16:21:40 +01:00
|
|
|
preFixup = ''
|
2021-05-07 12:22:55 +01:00
|
|
|
makeWrapperArgs+=(
|
|
|
|
"''${qtWrapperArgs[@]}"
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ borgbackup ]}
|
|
|
|
)
|
2020-03-28 21:32:34 +00:00
|
|
|
'';
|
|
|
|
|
2021-06-24 00:26:45 +01:00
|
|
|
checkInputs = with python3Packages; [
|
|
|
|
pytest-qt
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
# For tests/test_misc.py::test_autostart
|
|
|
|
mkdir -p $HOME/.config/autostart
|
|
|
|
export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
|
|
|
|
export QT_QPA_PLATFORM=offscreen
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/test_archives.py"
|
|
|
|
"tests/test_borg.py"
|
|
|
|
"tests/test_lock.py"
|
|
|
|
"tests/test_notifications.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"diff_archives_dict_issue-Users"
|
|
|
|
"diff_archives-test"
|
|
|
|
"test_repo_unlink"
|
|
|
|
"test_repo_add_success"
|
|
|
|
"test_ssh_dialog"
|
|
|
|
"test_create"
|
|
|
|
"test_scheduler_create_backup"
|
|
|
|
];
|
|
|
|
|
2020-03-28 21:32:34 +00:00
|
|
|
meta = with lib; {
|
2021-01-31 09:56:45 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-03-28 21:32:34 +00:00
|
|
|
homepage = "https://vorta.borgbase.com/";
|
|
|
|
maintainers = with maintainers; [ ma27 ];
|
|
|
|
description = "Desktop Backup Client for Borg";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|