1{ stdenv, fetchurl, python3Packages, acl, lz4, openssl }:
2
3python3Packages.buildPythonApplication rec {
4 name = "borgbackup-${version}";
5 version = "0.30.0";
6 namePrefix = "";
7
8 src = fetchurl {
9 url = "https://pypi.python.org/packages/source/b/borgbackup/borgbackup-${version}.tar.gz";
10 sha256 = "0n78c982kdfqbyi9jawcvzgdik4l36c2s7rpzkfr1ka6506k2rx4";
11 };
12
13 nativeBuildInputs = with python3Packages; [
14 # For building documentation:
15 sphinx
16 ];
17 propagatedBuildInputs = [
18 acl lz4 openssl
19 ] ++ (with python3Packages; [
20 cython msgpack llfuse tox detox setuptools_scm
21 ]);
22
23 preConfigure = ''
24 export BORG_OPENSSL_PREFIX="${openssl}"
25 export BORG_LZ4_PREFIX="${lz4}"
26 '';
27
28 postInstall = ''
29 make -C docs singlehtml
30 mkdir -p $out/share/doc/borg
31 cp -R docs/_build/singlehtml $out/share/doc/borg/html
32
33 make -C docs man
34 mkdir -p $out/share/man
35 cp -R docs/_build/man $out/share/man/man1
36 '';
37
38 meta = with stdenv.lib; {
39 description = "A deduplicating backup program (attic fork)";
40 homepage = https://borgbackup.github.io/;
41 license = licenses.bsd3;
42 platforms = platforms.unix; # Darwin and FreeBSD mentioned on homepage
43 maintainers = with maintainers; [ nckx ];
44 };
45}