at 24.11-pre 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 setuptools, 7 mock, 8 netaddr, 9 pytestCheckHook, 10 pythonOlder, 11}: 12 13buildPythonPackage rec { 14 pname = "pyeapi"; 15 version = "1.0.2"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "arista-eosplus"; 22 repo = "pyeapi"; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-GZBoCoAqij54rZezRDF/ihJDQ5T6FFyDSRXGV3//avQ="; 25 }; 26 27 patches = [ 28 # Replace imp, https://github.com/arista-eosplus/pyeapi/pull/295 29 (fetchpatch { 30 name = "replace-imp.patch"; 31 url = "https://github.com/arista-eosplus/pyeapi/commit/1f2d8e1fa61566082ccb11a1a17e0f3d8a0c89df.patch"; 32 hash = "sha256-ONviRU6eUUZ+TTJ4F41ZXqavW7RIi1MBO7s7OsnWknk="; 33 }) 34 ]; 35 36 build-system = [ setuptools ]; 37 38 dependencies = [ netaddr ]; 39 40 nativeCheckInputs = [ 41 mock 42 pytestCheckHook 43 ]; 44 45 pytestFlagsArray = [ "test/unit" ]; 46 47 pythonImportsCheck = [ "pyeapi" ]; 48 49 meta = with lib; { 50 description = "Client for Arista eAPI"; 51 homepage = "https://github.com/arista-eosplus/pyeapi"; 52 changelog = "https://github.com/arista-eosplus/pyeapi/releases/tag/v${version}"; 53 license = licenses.bsd3; 54 maintainers = with maintainers; [ astro ]; 55 }; 56}