about summary refs log tree commit diff
path: root/pkgs/development/python-modules/openwrt-luci-rpc
diff options
context:
space:
mode:
authorMatt Snider <matt.snider@protonmail.com>2020-03-21 10:20:21 +0100
committerJon <jonringer@users.noreply.github.com>2020-03-30 20:10:58 -0700
commitc015badaa2fca031bff218f44b134e2ce432c1a4 (patch)
tree749a38e3e50446e64533e5a43384fbe80f4194ff /pkgs/development/python-modules/openwrt-luci-rpc
parent00ca0c486957f2e95b5757d52330b2c2c76d7246 (diff)
python3Packages.openwrt-luci-rpc: init at 1.1.2
Diffstat (limited to 'pkgs/development/python-modules/openwrt-luci-rpc')
-rw-r--r--pkgs/development/python-modules/openwrt-luci-rpc/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/openwrt-luci-rpc/default.nix b/pkgs/development/python-modules/openwrt-luci-rpc/default.nix
new file mode 100644
index 0000000000000..4dc4ffa68fc03
--- /dev/null
+++ b/pkgs/development/python-modules/openwrt-luci-rpc/default.nix
@@ -0,0 +1,36 @@
+{ buildPythonPackage
+, fetchPypi
+, lib
+, click
+, requests
+, packaging
+}:
+
+with lib;
+
+buildPythonPackage rec {
+  pname = "openwrt-luci-rpc";
+  version = "1.1.2";
+
+  srcs = fetchPypi {
+    inherit pname version;
+    sha256 = "144bw7w1xvpdkad5phflpkl15ih5pvi19799wmvfv8mj1dn1yjhp";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py --replace "requests==2.21.0" "requests"
+    substituteInPlace setup.py --replace "packaging==19.1" "packaging"
+  '';
+
+  propagatedBuildInputs = [ click requests packaging ];
+
+  meta = {
+    description = ''
+      Python3 module for interacting with the OpenWrt Luci RPC interface.
+      Supports 15.X & 17.X & 18.X or newer releases of OpenWrt.
+    '';
+    homepage = "https://github.com/fbradyirl/openwrt-luci-rpc";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ matt-snider ];
+  };
+}