summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/mirakuru/default.nix
blob: aba0bb7a49206e28265992bab11dcc89a0690dcd (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
  stdenv,
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
  pytest-rerunfailures,
  setuptools,
  psutil,
  netcat,
  ps,
  python-daemon,
}:

buildPythonPackage rec {
  pname = "mirakuru";
  version = "2.6.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "ClearcodeHQ";
    repo = "mirakuru";
    tag = "v${version}";
    hash = "sha256-R5prLIub2kVhsKRGWbZMf/v0U7oOBieoLiHwMRDEs0I=";
  };

  build-system = [ setuptools ];

  dependencies = [ psutil ];

  nativeCheckInputs = [
    netcat.nc
    ps
    python-daemon
    pytest-rerunfailures
    pytestCheckHook
  ];

  pythonImportsCheck = [ "mirakuru" ];

  # Necessary for the tests to pass on Darwin with sandbox enabled.
  __darwinAllowLocalNetworking = true;

  # Those are failing in the darwin sandbox with:
  # > ps: %mem: requires entitlement
  # > ps: vsz: requires entitlement
  # > ps: rss: requires entitlement
  # > ps: time: requires entitlement
  disabledTests = [
    "test_forgotten_stop"
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [
    "test_mirakuru_cleanup"
    "test_daemons_killing"
  ];

  meta = {
    homepage = "https://github.com/dbfixtures/mirakuru";
    description = "Process orchestration tool designed for functional and integration tests";
    changelog = "https://github.com/ClearcodeHQ/mirakuru/blob/v${version}/CHANGES.rst";
    license = lib.licenses.lgpl3Plus;
    maintainers = with lib.maintainers; [ bcdarwin ];
  };
}