From c015badaa2fca031bff218f44b134e2ce432c1a4 Mon Sep 17 00:00:00 2001 From: Matt Snider Date: Sat, 21 Mar 2020 10:20:21 +0100 Subject: [PATCH] python3Packages.openwrt-luci-rpc: init at 1.1.2 --- .../openwrt-luci-rpc/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/openwrt-luci-rpc/default.nix 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 000000000000..4dc4ffa68fc0 --- /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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 77d1b33cb110..53d243055c48 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7040,6 +7040,8 @@ in { pyemd = callPackage ../development/python-modules/pyemd { }; + openwrt-luci-rpc = disabledIf (!isPy3k) (callPackage ../development/python-modules/openwrt-luci-rpc { }); + pulp = callPackage ../development/python-modules/pulp { }; behave = callPackage ../development/python-modules/behave { };