diff options
Diffstat (limited to 'pkgs/tools/backup/borgmatic/default.nix')
-rw-r--r-- | pkgs/tools/backup/borgmatic/default.nix | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/pkgs/tools/backup/borgmatic/default.nix b/pkgs/tools/backup/borgmatic/default.nix index dba8cf36b3a02..18318dc8e584b 100644 --- a/pkgs/tools/backup/borgmatic/default.nix +++ b/pkgs/tools/backup/borgmatic/default.nix @@ -1,34 +1,27 @@ -{ lib -, stdenv -, borgbackup -, coreutils -, python3Packages -, fetchpatch -, fetchPypi -, systemd -, enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd -, installShellFiles -, borgmatic -, testers +{ + borgbackup, + borgmatic, + coreutils, + enableSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, + fetchPypi, + fetchpatch, + installShellFiles, + lib, + python3Packages, + stdenv, + systemd, + testers, + nixosTests, }: - python3Packages.buildPythonApplication rec { pname = "borgmatic"; - version = "1.8.11"; + version = "1.8.13"; src = fetchPypi { inherit pname version; - sha256 = "sha256-Sgj15etVx8nnk0AZv+GzWscSqfqdC7+1wBE6gF/0aL0="; + hash = "sha256-4Z5imxNjfvd4fkpFsggSO9XueN5Yzcz4RCl+BqmddCM="; }; - patches = [ - (fetchpatch { - name = "prevent-network-access-in-tests.patch"; - url = "https://projects.torsion.org/borgmatic-collective/borgmatic/pulls/869.patch"; - hash = "sha256-jOo3LjgvJtyTaRKZX1wfnKNdw975hVekBkKfK4mJFAc="; - }) - ]; - nativeCheckInputs = with python3Packages; [ flexmock pytestCheckHook pytest-cov ] ++ passthru.optional-dependencies.apprise; # - test_borgmatic_version_matches_news_version @@ -44,13 +37,13 @@ python3Packages.buildPythonApplication rec { colorama jsonschema packaging - ruamel-yaml requests + ruamel-yaml setuptools ]; passthru.optional-dependencies = { - apprise = with python3Packages; [ apprise ]; + apprise = [ python3Packages.apprise ]; }; postInstall = '' @@ -68,15 +61,18 @@ python3Packages.buildPythonApplication rec { --replace "sleep " "${coreutils}/bin/sleep " ''; - passthru.tests.version = testers.testVersion { package = borgmatic; }; + passthru.tests = { + version = testers.testVersion { package = borgmatic; }; + inherit (nixosTests) borgmatic; + }; __darwinAllowLocalNetworking = true; - meta = with lib; { + meta = { description = "Simple, configuration-driven backup software for servers and workstations"; homepage = "https://torsion.org/borgmatic/"; - license = licenses.gpl3Plus; - platforms = platforms.all; - maintainers = with maintainers; [ imlonghao ]; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ imlonghao x123 ]; }; } |