anchor.diff: -{ 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";
  
positive.code:   '';
  
    checkInputs = with python3.pkgs; [
      pytest
    ];
  
    checkPhase = ''
      HOME=$(mktemp -d) py.test --pyargs borg.testsuite
    '';
  
    # 64 failures, needs pytest-benchmark
    doCheck = false;
  
    passthru.tests = {
      inherit (nixosTests) borgbackup;
  
negative.code:     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
    ];
  
    buildInputs = [
      libb2
      lz4
      zstd
      openssl
    ] ++ lib.optionals stdenv.isLinux [
      acl
    ];
  
    propagatedBuildInputs = with python3.pkgs; [
      cython
      llfuse
      packaging
      pyfuse3
    ];
  
    preConfigure = ''
  