From cc785830964f78d7c59123384d219c73ad87ec97 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 20 Dec 2021 17:42:39 +0100 Subject: [PATCH] python3Packages.losant-rest: init at 1.15.1 --- .../python-modules/losant-rest/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/losant-rest/default.nix diff --git a/pkgs/development/python-modules/losant-rest/default.nix b/pkgs/development/python-modules/losant-rest/default.nix new file mode 100644 index 000000000000..36b6efa724e2 --- /dev/null +++ b/pkgs/development/python-modules/losant-rest/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, requests +, requests-mock +}: + +buildPythonPackage rec { + pname = "losant-rest"; + version = "1.15.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "Losant"; + repo = "losant-rest-python"; + rev = "v${version}"; + sha256 = "sha256-j8Vzr83pvl/AnXfA+nl5uRXf+y6ndKmQHM3bl306wFM="; + }; + + propagatedBuildInputs = [ + requests + ]; + + checkInputs = [ + pytestCheckHook + requests-mock + ]; + + pytestFlagsArray = [ + "tests/losantrest_tests.py" + ]; + + pythonImportsCheck = [ + "losantrest" + ]; + + meta = with lib; { + description = "Python module for consuming the Losant IoT Platform API"; + homepage = "https://github.com/Losant/losant-rest-python"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 679625d51a6c..55b08f644cd1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4619,6 +4619,8 @@ in { loo-py = callPackage ../development/python-modules/loo-py { }; + losant-rest = callPackage ../development/python-modules/losant-rest { }; + lsassy = callPackage ../development/python-modules/lsassy { }; luddite = callPackage ../development/python-modules/luddite { };