nixpkgs/pkgs/tools/backup/borgmatic/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.4 KiB
Nix
Raw Normal View History

2021-02-17 05:49:52 +01:00
{ borgbackup, coreutils, lib, python3Packages, systemd }:
python3Packages.buildPythonApplication rec {
pname = "borgmatic";
2022-06-25 15:07:54 +02:00
version = "1.6.4";
2021-02-17 05:49:52 +01:00
src = python3Packages.fetchPypi {
inherit pname version;
2022-06-25 15:07:54 +02:00
sha256 = "sha256-2kQ+KO69RxpIQkrkD6n7l9ti9ITwdpHYK7LuXYUo3ck=";
2021-02-17 05:49:52 +01:00
};
checkInputs = with python3Packages; [ flexmock pytestCheckHook pytest-cov ];
# - test_borgmatic_version_matches_news_version
# The file NEWS not available on the pypi source, and this test is useless
disabledTests = [
"test_borgmatic_version_matches_news_version"
];
propagatedBuildInputs = with python3Packages; [
borgbackup
colorama
2021-09-10 17:34:56 +02:00
jsonschema
ruamel-yaml
2021-02-17 05:49:52 +01:00
requests
setuptools
];
postInstall = ''
mkdir -p $out/lib/systemd/system
cp sample/systemd/borgmatic.timer $out/lib/systemd/system/
substitute sample/systemd/borgmatic.service \
$out/lib/systemd/system/borgmatic.service \
--replace /root/.local/bin/borgmatic $out/bin/borgmatic \
--replace systemd-inhibit ${systemd}/bin/systemd-inhibit \
--replace sleep ${coreutils}/bin/sleep
'';
meta = with lib; {
description = "Simple, configuration-driven backup software for servers and workstations";
homepage = "https://torsion.org/borgmatic/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ imlonghao ];
};
}