about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pyeapi/default.nix
blob: a31123492d423ff2d90c3d79a62303bb12d1250c (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
{ lib
, buildPythonPackage
, pythonAtLeast
, fetchFromGitHub
, netaddr
, pytestCheckHook
, mock
}:

buildPythonPackage rec {
  pname = "pyeapi";
  version = "0.8.4";
  format = "pyproject";

  # https://github.com/arista-eosplus/pyeapi/issues/189
  disabled = pythonAtLeast "3.10";

  src = fetchFromGitHub {
    owner = "arista-eosplus";
    repo = pname;
    rev = "v${version}";
    sha256 = "13chya6wix5jb82k67gr44bjx35gcdwz80nsvpv0gvzs6shn4d7b";
  };

  propagatedBuildInputs = [ netaddr ];

  checkInputs = [
    mock
    pytestCheckHook
  ];

  pytestFlagsArray = [ "test/unit" ];

  pythonImportsCheck = [ "pyeapi" ];

  meta = with lib; {
    description = "Client for Arista eAPI";
    homepage = "https://github.com/arista-eosplus/pyeapi";
    license = licenses.bsd3;
    maintainers = [ maintainers.astro ];
  };
}