20 python.pkgs.buildPythonApplication rec {
25 src = fetchFromGitHub {
28 rev = "refs/tags/${version}";
29 hash = "sha256-n1hCM7Sp0t2bOJEzErEd1PS/Xc7c+KDmJ4PjQuuF140=";
33 # sandbox does not support setuid/setgid/sticky bits
34 substituteInPlace src/borg/testsuite/archiver.py \
35 --replace-fail "0o4755" "0o0755"
38 build-system = with python.pkgs; [
44 nativeBuildInputs = with python.pkgs; [
53 sphinxBuilders = [ "singlehtml" "man" ];
61 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
65 dependencies = with python.pkgs; [
68 (if stdenv.hostPlatform.isLinux then pyfuse3 else llfuse)
72 ''--prefix PATH ':' "${openssh}/bin"''
76 installShellCompletion --cmd borg \
77 --bash scripts/shell_completions/bash/borg \
78 --fish scripts/shell_completions/fish/borg.fish \
79 --zsh scripts/shell_completions/zsh/_borg
82 nativeCheckInputs = with python.pkgs; [
92 "--pyargs" "borg.testsuite"
96 # fuse: device not found, try 'modprobe fuse' first
98 "test_fuse_allow_damaged_files"
99 "test_fuse_mount_hardlinks"
100 "test_fuse_mount_options"
101 "test_fuse_versions_view"
102 "test_migrate_lock_alive"
103 "test_readonly_mount"
104 # Error: Permission denied while trying to write to /var/{,tmp}
107 "test_get_security_dir"
108 "test_get_config_dir"
109 # https://github.com/borgbackup/borg/issues/6573
110 "test_basic_functionality"
118 inherit (nixosTests) borgbackup;
121 outputs = [ "out" "doc" "man" ];
123 disabled = python.pythonOlder "3.9";
126 changelog = "https://github.com/borgbackup/borg/blob/${src.rev}/docs/changes.rst";
127 description = "Deduplicating archiver with compression and encryption";
128 homepage = "https://www.borgbackup.org";
129 license = licenses.bsd3;
130 platforms = platforms.unix; # Darwin and FreeBSD mentioned on homepage
131 mainProgram = "borg";
132 maintainers = with maintainers; [ dotlambda globin ];