diff options
Diffstat (limited to 'pkgs/tools/backup/borgbackup/default.nix')
-rw-r--r-- | pkgs/tools/backup/borgbackup/default.nix | 70 |
1 files changed, 59 insertions, 11 deletions
diff --git a/pkgs/tools/backup/borgbackup/default.nix b/pkgs/tools/backup/borgbackup/default.nix index 89e1f3e7e47..ad78dcacd78 100644 --- a/pkgs/tools/backup/borgbackup/default.nix +++ b/pkgs/tools/backup/borgbackup/default.nix @@ -1,4 +1,15 @@ -{ lib, stdenv, python3, acl, libb2, lz4, zstd, openssl, openssh, nixosTests }: +{ lib +, stdenv +, acl +, e2fsprogs +, libb2 +, lz4 +, openssh +, openssl +, python3 +, zstd +, nixosTests +}: python3.pkgs.buildPythonApplication rec { pname = "borgbackup"; @@ -9,17 +20,33 @@ python3.pkgs.buildPythonApplication rec { sha256 = "0x0ncy0b0bmf586hbdgrif3gjmkdw760vfnfxndr493v07y29fbs"; }; + postPatch = '' + # sandbox does not support setuid/setgid/sticky bits + substituteInPlace src/borg/testsuite/archiver.py \ + --replace "0o4755" "0o0755" + ''; + nativeBuildInputs = with python3.pkgs; [ setuptools-scm # For building documentation: - sphinx guzzle_sphinx_theme + sphinx + guzzle_sphinx_theme ]; + buildInputs = [ - libb2 lz4 zstd openssl - ] ++ lib.optionals stdenv.isLinux [ acl ]; + libb2 + lz4 + zstd + openssl + ] ++ lib.optionals stdenv.isLinux [ + acl + ]; + propagatedBuildInputs = with python3.pkgs; [ + cython + llfuse packaging - cython llfuse + pyfuse3 ]; preConfigure = '' @@ -53,15 +80,36 @@ python3.pkgs.buildPythonApplication rec { ''; checkInputs = with python3.pkgs; [ - pytest + e2fsprogs + pytest-benchmark + pytest-xdist + pytestCheckHook ]; - checkPhase = '' - HOME=$(mktemp -d) py.test --pyargs borg.testsuite - ''; + pytestFlagsArray = [ + "--numprocesses" "auto" + "--benchmark-skip" + "--pyargs" "borg.testsuite" + ]; - # 64 failures, needs pytest-benchmark - doCheck = false; + disabledTests = [ + # fuse: device not found, try 'modprobe fuse' first + "test_fuse" + "test_fuse_allow_damaged_files" + "test_fuse_mount_hardlinks" + "test_fuse_mount_options" + "test_fuse_versions_view" + "test_readonly_mount" + # Error: Permission denied while trying to write to /var/{,tmp} + "test_get_cache_dir" + "test_get_keys_dir" + "test_get_security_dir" + "test_get_config_dir" + ]; + + preCheck = '' + export HOME=$TEMP + ''; passthru.tests = { inherit (nixosTests) borgbackup; |