summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/sysrsync/default.nix
blob: f9a1fb219730d4bcdbe5181af609039e367cac6e (plain)
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
37
38
39
40
41
42
43
44
45
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  poetry-core,
  setuptools,
  rsync,
  toml,
}:

buildPythonPackage rec {
  pname = "sysrsync";
  version = "1.1.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "gchamon";
    repo = "sysrsync";
    tag = version;
    hash = "sha256-2Sz3JrNmIGOnad+qjRzbAgsFEzDtwBT0KLEFyQKZra4=";
  };

  postPatch = ''
    substituteInPlace sysrsync/command_maker.py \
      --replace-fail "'rsync'" "'${rsync}/bin/rsync'"
  '';

  build-system = [
    poetry-core
    setuptools
  ];

  dependencies = [
    toml
  ];

  pythonImportsCheck = [ "sysrsync" ];

  meta = {
    description = "Simple and safe system's rsync wrapper for Python";
    homepage = "https://github.com/gchamon/sysrsync";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ veprbl ];
  };
}