about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-03-16 23:18:45 +0100
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-03-16 22:07:57 -0700
commit877ec087cd2111de7327d6a5e76e6ce295f720ec (patch)
tree55373a4cc7c33a284a6fe101a53131a9ba255546 /pkgs
parent36e263f430972b4f0c12bd0dd45c05a8f545251b (diff)
python3Packages.openwrt-luci-rpc: update testing part and meta
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/openwrt-luci-rpc/default.nix36
1 files changed, 21 insertions, 15 deletions
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;