1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, setuptools
5, mock
6, netaddr
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "pyeapi";
13 version = "1.0.2";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "arista-eosplus";
20 repo = pname;
21 rev = "refs/tags/v${version}";
22 sha256 = "sha256-GZBoCoAqij54rZezRDF/ihJDQ5T6FFyDSRXGV3//avQ=";
23 };
24
25 nativeBuildInputs = [
26 setuptools
27 ];
28
29 propagatedBuildInputs = [
30 netaddr
31 ];
32
33 nativeCheckInputs = [
34 mock
35 pytestCheckHook
36 ];
37
38 pytestFlagsArray = [
39 "test/unit"
40 ];
41
42 pythonImportsCheck = [
43 "pyeapi"
44 ];
45
46 meta = with lib; {
47 description = "Client for Arista eAPI";
48 homepage = "https://github.com/arista-eosplus/pyeapi";
49 license = licenses.bsd3;
50 maintainers = with maintainers; [ astro ];
51 };
52}