From 877ec087cd2111de7327d6a5e76e6ce295f720ec Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Mar 2021 23:18:45 +0100 Subject: python3Packages.openwrt-luci-rpc: update testing part and meta --- .../python-modules/openwrt-luci-rpc/default.nix | 36 +++++++++++++--------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'pkgs') diff --git a/pkgs/development/python-modules/openwrt-luci-rpc/default.nix b/pkgs/development/python-modules/openwrt-luci-rpc/default.nix index 811d67bec2670..7661295ba239e 100644 --- a/pkgs/development/python-modules/openwrt-luci-rpc/default.nix +++ b/pkgs/development/python-modules/openwrt-luci-rpc/default.nix @@ -1,13 +1,12 @@ -{ buildPythonPackage -, fetchPypi -, lib +{ lib +, buildPythonPackage , click -, requests +, fetchPypi , packaging +, pytestCheckHook +, requests }: -with lib; - buildPythonPackage rec { pname = "openwrt-luci-rpc"; version = "1.1.8"; @@ -17,17 +16,24 @@ buildPythonPackage rec { sha256 = "sha256-bo9HLT0q0yiLJI7i5v/36G82FHbGCtnAI50iGniyKSU="; }; - postPatch = '' - substituteInPlace setup.py --replace "requests==2.21.0" "requests" - substituteInPlace setup.py --replace "packaging==19.1" "packaging" - ''; + propagatedBuildInputs = [ + click + requests + packaging + ]; + + checkInputs = [ + pytestCheckHook + ]; - propagatedBuildInputs = [ click requests packaging ]; + pythonImportsCheck = [ "openwrt_luci_rpc" ]; - meta = { - description = '' - Python3 module for interacting with the OpenWrt Luci RPC interface. - Supports 15.X & 17.X & 18.X or newer releases of OpenWrt. + meta = with lib; { + description = "Python module for interacting with the OpenWrt Luci RPC interface"; + longDescription = '' + This module allows you to use the Luci RPC interface to fetch connected devices + on your OpenWrt based router. Supports 15.X & 17.X & 18.X or newer releases of + OpenWrt. ''; homepage = "https://github.com/fbradyirl/openwrt-luci-rpc"; license = licenses.asl20; -- cgit 1.4.1