2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
setuptools,
|
|
|
|
mock,
|
|
|
|
netaddr,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2022-03-05 16:20:37 +00:00
|
|
|
}:
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyeapi";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "1.0.2";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2022-02-21 08:47:16 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2022-02-21 08:47:16 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arista-eosplus";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "pyeapi";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-GZBoCoAqij54rZezRDF/ihJDQ5T6FFyDSRXGV3//avQ=";
|
2022-02-21 08:47:16 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
|
|
|
# Replace imp, https://github.com/arista-eosplus/pyeapi/pull/295
|
|
|
|
(fetchpatch {
|
|
|
|
name = "replace-imp.patch";
|
|
|
|
url = "https://github.com/arista-eosplus/pyeapi/commit/1f2d8e1fa61566082ccb11a1a17e0f3d8a0c89df.patch";
|
|
|
|
hash = "sha256-ONviRU6eUUZ+TTJ4F41ZXqavW7RIi1MBO7s7OsnWknk=";
|
|
|
|
})
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [ netaddr ];
|
2022-02-21 08:47:16 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-05 16:20:37 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pytestFlagsArray = [ "test/unit" ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "pyeapi" ];
|
2022-02-21 08:47:16 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Client for Arista eAPI";
|
|
|
|
homepage = "https://github.com/arista-eosplus/pyeapi";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/arista-eosplus/pyeapi/releases/tag/v${version}";
|
2022-02-21 08:47:16 +00:00
|
|
|
license = licenses.bsd3;
|
2022-04-27 09:35:20 +00:00
|
|
|
maintainers = with maintainers; [ astro ];
|
2022-02-21 08:47:16 +00:00
|
|
|
};
|
|
|
|
}
|