diff --git a/pkgs/development/python-modules/nexia/default.nix b/pkgs/development/python-modules/nexia/default.nix new file mode 100644 index 00000000000..dbd1c798a3f --- /dev/null +++ b/pkgs/development/python-modules/nexia/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, requests +, requests-mock +}: + +buildPythonPackage rec { + pname = "nexia"; + version = "0.9.6"; + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "bdraco"; + repo = pname; + rev = version; + sha256 = "1k8h1p2zqm8gghff03jh8q3zik7jw2l686cyyg36r3qrgz6zi19q"; + }; + + propagatedBuildInputs = [ + requests + ]; + + checkInputs = [ + requests-mock + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py --replace '"pytest-runner",' "" + ''; + + pythonImportsCheck = [ "nexia" ]; + + meta = with lib; { + description = "Python module for Nexia thermostats"; + homepage = "https://github.com/bdraco/nexia"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 94b40598183..89528a64f93 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4622,6 +4622,8 @@ in { nevow = callPackage ../development/python-modules/nevow { }; + nexia = callPackage ../development/python-modules/nexia { }; + nghttp2 = (toPythonModule (pkgs.nghttp2.override { inherit (self) python cython setuptools; inherit (pkgs) ncurses;