nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 21.05 78 lines 2.1 kB view raw
1{ lib, stdenv, python3, acl, libb2, lz4, zstd, openssl, openssh, nixosTests }: 2 3python3.pkgs.buildPythonApplication rec { 4 pname = "borgbackup"; 5 version = "1.1.16"; 6 7 src = python3.pkgs.fetchPypi { 8 inherit pname version; 9 sha256 = "0l1dqfwrd9l34rg30cmzmq5bs6yha6kg4vy313jq611jsqj94mmw"; 10 }; 11 12 nativeBuildInputs = with python3.pkgs; [ 13 setuptools-scm 14 # For building documentation: 15 sphinx guzzle_sphinx_theme 16 ]; 17 buildInputs = [ 18 libb2 lz4 zstd openssl 19 ] ++ lib.optionals stdenv.isLinux [ acl ]; 20 propagatedBuildInputs = with python3.pkgs; [ 21 cython llfuse 22 ]; 23 24 preConfigure = '' 25 export BORG_OPENSSL_PREFIX="${openssl.dev}" 26 export BORG_LZ4_PREFIX="${lz4.dev}" 27 export BORG_LIBB2_PREFIX="${libb2}" 28 export BORG_LIBZSTD_PREFIX="${zstd.dev}" 29 ''; 30 31 makeWrapperArgs = [ 32 ''--prefix PATH ':' "${openssh}/bin"'' 33 ]; 34 35 postInstall = '' 36 make -C docs singlehtml 37 mkdir -p $out/share/doc/borg 38 cp -R docs/_build/singlehtml $out/share/doc/borg/html 39 40 make -C docs man 41 mkdir -p $out/share/man 42 cp -R docs/_build/man $out/share/man/man1 43 44 mkdir -p $out/share/bash-completion/completions 45 cp scripts/shell_completions/bash/borg $out/share/bash-completion/completions/ 46 47 mkdir -p $out/share/fish/vendor_completions.d 48 cp scripts/shell_completions/fish/borg.fish $out/share/fish/vendor_completions.d/ 49 50 mkdir -p $out/share/zsh/site-functions 51 cp scripts/shell_completions/zsh/_borg $out/share/zsh/site-functions/ 52 ''; 53 54 checkInputs = with python3.pkgs; [ 55 pytest 56 ]; 57 58 checkPhase = '' 59 HOME=$(mktemp -d) py.test --pyargs borg.testsuite 60 ''; 61 62 # 64 failures, needs pytest-benchmark 63 doCheck = false; 64 65 passthru.tests = { 66 inherit (nixosTests) borgbackup; 67 }; 68 69 outputs = [ "out" "doc" ]; 70 71 meta = with lib; { 72 description = "Deduplicating archiver with compression and encryption"; 73 homepage = "https://www.borgbackup.org"; 74 license = licenses.bsd3; 75 platforms = platforms.unix; # Darwin and FreeBSD mentioned on homepage 76 maintainers = with maintainers; [ flokli dotlambda globin ]; 77 }; 78}