about summary refs log tree commit diff
path: root/pkgs/by-name/ma/mackup/package.nix
blob: b39590b6454a2d824e717be7dc7d075a5e470b91 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  lib,
  python3Packages,
  fetchFromGitHub,
  procps,
}:
python3Packages.buildPythonApplication rec {
  pname = "mackup";
  version = "0.8.40";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "lra";
    repo = "mackup";
    rev = "refs/tags/${version}";
    hash = "sha256-hAIl9nGFRaROlt764IZg4ejw+b1dpnYpiYq4CB9dJqQ=";
  };

  postPatch = ''
    substituteInPlace mackup/utils.py \
      --replace-fail '"/usr/bin/pgrep"' '"${lib.getExe' procps "pgrep"}"'
  '';

  nativeBuildInputs = with python3Packages; [
    poetry-core
    pythonRelaxDepsHook
    nose
  ];

  propagatedBuildInputs = with python3Packages; [
    six
    docopt
  ];

  pythonImportsCheck = [ "mackup" ];

  checkPhase = ''
    nosetests
  '';

  meta = {
    description = "A tool to keep your application settings in sync (OS X/Linux)";
    changelog = "https://github.com/lra/mackup/releases/tag/${version}";
    license = lib.licenses.agpl3Only;
    homepage = "https://github.com/lra/mackup";
    maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
    mainProgram = "mackup";
  };
}