3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #130051 from mweinelt/borgbackup

This commit is contained in:
Sandro 2021-07-13 22:40:27 +02:00 committed by GitHub
commit a5705a8efb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,33 +1,52 @@
{ lib, stdenv, python3, fetchpatch, acl, libb2, lz4, zstd, openssl, openssh, nixosTests }:
{ lib
, stdenv
, acl
, e2fsprogs
, libb2
, lz4
, openssh
, openssl
, python3
, zstd
, nixosTests
}:
python3.pkgs.buildPythonApplication rec {
pname = "borgbackup";
version = "1.1.16";
version = "1.1.17";
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "0l1dqfwrd9l34rg30cmzmq5bs6yha6kg4vy313jq611jsqj94mmw";
sha256 = "0x0ncy0b0bmf586hbdgrif3gjmkdw760vfnfxndr493v07y29fbs";
};
patches = [
# fix compatibility with sphinx 4
(fetchpatch {
url = "https://github.com/borgbackup/borg/commit/6a1f31bf2914d167e2f5051f1d531d5d4a19f54b.patch";
includes = [ "docs/conf.py" ];
sha256 = "0aa4kyb3j4apgwqcy1hzg6lxvpf60m2mijcj60vh101b42410hiz";
})
];
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
cython
llfuse
packaging
pyfuse3
];
preConfigure = ''
@ -61,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;