at 23.05-pre 1.8 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, setuptools 6, mock 7, netaddr 8, pytestCheckHook 9, pythonOlder 10}: 11 12buildPythonPackage rec { 13 pname = "pyeapi"; 14 version = "0.8.4"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "arista-eosplus"; 21 repo = pname; 22 rev = "v${version}"; 23 sha256 = "13chya6wix5jb82k67gr44bjx35gcdwz80nsvpv0gvzs6shn4d7b"; 24 }; 25 26 nativeBuildInputs = [ 27 setuptools 28 ]; 29 30 propagatedBuildInputs = [ 31 netaddr 32 ]; 33 34 checkInputs = [ 35 mock 36 pytestCheckHook 37 ]; 38 39 patches = [ 40 # Fix usage of collection, https://github.com/arista-eosplus/pyeapi/pull/223 41 (fetchpatch { 42 name = "fix-collection-usage.patch"; 43 url = "https://github.com/arista-eosplus/pyeapi/commit/81754f57eb095703cc474f527a0915360af76f68.patch"; 44 sha256 = "sha256-ZNBTPRNmXCFVJeRAJxzIHmCOXZiGwU6t4ekSupU3BX8="; 45 }) 46 (fetchpatch { 47 name = "fix-collection-usage-2.patch"; 48 url = "https://github.com/arista-eosplus/pyeapi/commit/cc9c584e4a3167e3c1624cccb6bc0d9c9bcdbc1c.patch"; 49 sha256 = "sha256-EY0i1Skm1llEQAAzvrb2yelhhLBkqKAFJB5ObAIxAYo="; 50 excludes = [ 51 ".github/workflows/ci.yml" 52 ]; 53 }) 54 (fetchpatch { 55 name = "fix-collection-usage-3.patch"; 56 url = "https://github.com/arista-eosplus/pyeapi/commit/dc35ab076687ea71665ae9524480b05a4e893909.patch"; 57 sha256 = "sha256-xPaYULCPTxiQGB9Im/qLet+XebW9wq+TAfrxcgQxcoE="; 58 }) 59 ]; 60 61 pytestFlagsArray = [ 62 "test/unit" 63 ]; 64 65 pythonImportsCheck = [ 66 "pyeapi" 67 ]; 68 69 meta = with lib; { 70 description = "Client for Arista eAPI"; 71 homepage = "https://github.com/arista-eosplus/pyeapi"; 72 license = licenses.bsd3; 73 maintainers = with maintainers; [ astro ]; 74 }; 75}