about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/backup/rdiff-backup/default.nix
blob: 5892ddbe0106690501451bc3f1ea88159a120e57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib, python3Packages, fetchPypi, librsync }:

let
  pypkgs = python3Packages;

in
pypkgs.buildPythonApplication rec {
  pname = "rdiff-backup";
  version = "2.0.5";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-VNFgOOYgFO2RbHHIMDsH0vphpqaAOMoYn8LTFTSw84s=";
  };

  # pkg_resources fails to find the version and then falls back to "DEV"
  postPatch = ''
    substituteInPlace src/rdiff_backup/Globals.py \
      --replace 'version = "DEV"' 'version = "${version}"'
  '';

  buildInputs = [ librsync ];

  nativeBuildInputs = with pypkgs; [ setuptools-scm ];

  # no tests from pypi
  doCheck = false;

  meta = with lib; {
    description = "Backup system trying to combine best a mirror and an incremental backup system";
    homepage = "https://rdiff-backup.net";
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ peterhoeg ];
    platforms = platforms.all;
  };
}