summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/mobly/default.nix
blob: 4351f692dfe57d35bf86953ab497c75f54fde485 (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
65
66
67
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  setuptools,

  # dependencies
  portpicker,
  pyserial,
  pyyaml,
  timeout-decorator,
  typing-extensions,

  # tests
  procps,
  pytestCheckHook,
  pytz,
}:

buildPythonPackage rec {
  pname = "mobly";
  version = "1.13";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "google";
    repo = "mobly";
    tag = version;
    hash = "sha256-lQyhLZFA9lad7LYKa6AP+nQonTRtiFA8Egjo0ATbLVI=";
  };

  build-system = [ setuptools ];

  dependencies = [
    portpicker
    pyserial
    pyyaml
    timeout-decorator
    typing-extensions
  ];

  nativeCheckInputs = [
    procps
    pytestCheckHook
    pytz
  ];

  disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
    # cannot access /usr/bin/pgrep from the sandbox
    "test_stop_standing_subproc"
    "test_stop_standing_subproc_and_descendants"
    "test_stop_standing_subproc_without_pipe"
  ];

  __darwinAllowLocalNetworking = true;

  meta = {
    changelog = "https://github.com/google/mobly/blob/${src.rev}/CHANGELOG.md";
    description = "Automation framework for special end-to-end test cases";
    homepage = "https://github.com/google/mobly";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ hexa ];
  };
}