diff options
-rw-r--r-- | pkgs/development/python-modules/netutils/default.nix | 41 | ||||
-rw-r--r-- | pkgs/development/python-modules/pyeapi/default.nix | 48 |
2 files changed, 44 insertions, 45 deletions
diff --git a/pkgs/development/python-modules/netutils/default.nix b/pkgs/development/python-modules/netutils/default.nix index c7a1580ba9515..93b1d2b2e3bbf 100644 --- a/pkgs/development/python-modules/netutils/default.nix +++ b/pkgs/development/python-modules/netutils/default.nix @@ -1,20 +1,21 @@ -{ lib -, stdenv -, buildPythonPackage -, fetchFromGitHub -, jinja2 -, jsonschema -, napalm -, poetry-core -, pytestCheckHook -, pythonOlder -, pyyaml -, toml +{ + lib, + stdenv, + buildPythonPackage, + fetchFromGitHub, + jinja2, + jsonschema, + napalm, + poetry-core, + pytestCheckHook, + pythonOlder, + pyyaml, + toml, }: buildPythonPackage rec { pname = "netutils"; - version = "1.7.0"; + version = "1.8.0"; pyproject = true; disabled = pythonOlder "3.8"; @@ -23,16 +24,12 @@ buildPythonPackage rec { owner = "networktocode"; repo = "netutils"; rev = "refs/tags/v${version}"; - hash = "sha256-B2epTqG0PzcD876Bk222nDSorHHB8Znepp+cgl1++gY="; + hash = "sha256-Eqs/YkU2XrjD7x2WgvvR89/Pdi9AW9vhw3alJ8kIDgc="; }; - nativeBuildInputs = [ - poetry-core - ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ - jsonschema - ]; + dependencies = [ jsonschema ]; passthru.optional-dependencies.optionals = [ jsonschema @@ -46,9 +43,7 @@ buildPythonPackage rec { toml ]; - pythonImportsCheck = [ - "netutils" - ]; + pythonImportsCheck = [ "netutils" ]; disabledTests = [ # Tests require network access diff --git a/pkgs/development/python-modules/pyeapi/default.nix b/pkgs/development/python-modules/pyeapi/default.nix index 2ca3ff02edd9b..a7063c55e7aeb 100644 --- a/pkgs/development/python-modules/pyeapi/default.nix +++ b/pkgs/development/python-modules/pyeapi/default.nix @@ -1,51 +1,55 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, setuptools -, mock -, netaddr -, pytestCheckHook -, pythonOlder +{ + lib, + buildPythonPackage, + fetchFromGitHub, + fetchpatch, + setuptools, + mock, + netaddr, + pytestCheckHook, + pythonOlder, }: buildPythonPackage rec { pname = "pyeapi"; version = "1.0.2"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "arista-eosplus"; - repo = pname; + repo = "pyeapi"; rev = "refs/tags/v${version}"; - sha256 = "sha256-GZBoCoAqij54rZezRDF/ihJDQ5T6FFyDSRXGV3//avQ="; + hash = "sha256-GZBoCoAqij54rZezRDF/ihJDQ5T6FFyDSRXGV3//avQ="; }; - nativeBuildInputs = [ - setuptools + 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="; + }) ]; - propagatedBuildInputs = [ - netaddr - ]; + build-system = [ setuptools ]; + + dependencies = [ netaddr ]; nativeCheckInputs = [ mock pytestCheckHook ]; - pytestFlagsArray = [ - "test/unit" - ]; + pytestFlagsArray = [ "test/unit" ]; - pythonImportsCheck = [ - "pyeapi" - ]; + pythonImportsCheck = [ "pyeapi" ]; meta = with lib; { description = "Client for Arista eAPI"; homepage = "https://github.com/arista-eosplus/pyeapi"; + changelog = "https://github.com/arista-eosplus/pyeapi/releases/tag/v${version}"; license = licenses.bsd3; maintainers = with maintainers; [ astro ]; }; |