diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2020-01-21 08:04:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-21 08:04:11 +0000 |
commit | e48d9e6871624e016b1281378ac0a68490aeb31e (patch) | |
tree | ba8591d2aef11b9c86235e6cfd577e01c2f3643e | |
parent | 2b4753182e6ff1ea12a6fe02cb2237e087c73bcf (diff) | |
parent | 1d24ce5ba0ffe410ca2e970ab7ed21304684dbd7 (diff) | |
download | nixpkgs-e48d9e6871624e016b1281378ac0a68490aeb31e.tar nixpkgs-e48d9e6871624e016b1281378ac0a68490aeb31e.tar.gz nixpkgs-e48d9e6871624e016b1281378ac0a68490aeb31e.tar.bz2 nixpkgs-e48d9e6871624e016b1281378ac0a68490aeb31e.tar.lz nixpkgs-e48d9e6871624e016b1281378ac0a68490aeb31e.tar.xz nixpkgs-e48d9e6871624e016b1281378ac0a68490aeb31e.tar.zst nixpkgs-e48d9e6871624e016b1281378ac0a68490aeb31e.zip |
home-assistant: add icloud support (#78109)
home-assistant: add icloud support
-rw-r--r-- | pkgs/development/python-modules/pyicloud/default.nix | 51 | ||||
-rw-r--r-- | pkgs/development/python-modules/snitun/default.nix | 5 | ||||
-rw-r--r-- | pkgs/servers/home-assistant/component-packages.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
4 files changed, 57 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/pyicloud/default.nix b/pkgs/development/python-modules/pyicloud/default.nix new file mode 100644 index 00000000000..50dd1a09890 --- /dev/null +++ b/pkgs/development/python-modules/pyicloud/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchPypi +, requests +, keyring +, keyrings-alt +, click +, six +, tzlocal +, certifi +, bitstring +, unittest2 +}: + +buildPythonPackage rec { + pname = "pyicloud"; + version = "0.9.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "580b52e95f67a41ed86c56a514aa2b362f53fbaf23f16c69fb24e0d19fd373ee"; + }; + + propagatedBuildInputs = [ + requests + keyring + keyrings-alt + click + six + tzlocal + certifi + bitstring + ]; + + checkInputs = [ unittest2 ]; + + postPatch = '' + sed -i \ + -e 's!click>=6.0,<7.0!click!' \ + -e 's!keyring>=8.0,<9.0!keyring!' \ + -e 's!keyrings.alt>=1.0,<2.0!keyrings.alt!' \ + requirements.txt + ''; + + meta = with lib; { + description = "PyiCloud is a module which allows pythonistas to interact with iCloud webservices"; + homepage = https://github.com/picklepete/pyicloud; + license = licenses.mit; + maintainers = [ maintainers.mic92 ]; + }; +} diff --git a/pkgs/development/python-modules/snitun/default.nix b/pkgs/development/python-modules/snitun/default.nix index da9dbd79845..8212379e3d4 100644 --- a/pkgs/development/python-modules/snitun/default.nix +++ b/pkgs/development/python-modules/snitun/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, python, fetchFromGitHub, attrs, cryptography, async-timeout, pytest-aiohttp, pytest }: +{ lib, stdenv, buildPythonPackage, python, fetchFromGitHub, attrs, cryptography, async-timeout, pytest-aiohttp, pytest }: buildPythonPackage rec { pname = "snitun"; @@ -16,7 +16,8 @@ buildPythonPackage rec { checkInputs = [ pytest pytest-aiohttp ]; checkPhase = '' - pytest tests/ + # https://github.com/NabuCasa/snitun/issues/61 + pytest ${lib.optionalString stdenv.isDarwin "-k 'not test_multiplexer_data_channel_abort_full'"} tests/ ''; meta = with lib; { diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index ebb6192fa6a..275241fcd17 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -339,7 +339,7 @@ "hyperion" = ps: with ps; [ ]; "ialarm" = ps: with ps; [ ]; "iaqualink" = ps: with ps; [ ]; - "icloud" = ps: with ps; [ ]; + "icloud" = ps: with ps; [ pyicloud ]; "idteck_prox" = ps: with ps; [ ]; "ifttt" = ps: with ps; [ aiohttp-cors pyfttt ]; "iglo" = ps: with ps; [ ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 34f9d5e3d1d..ae7387bf5cb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -948,6 +948,8 @@ in { pdfx = callPackage ../development/python-modules/pdfx { }; + pyicloud = callPackage ../development/python-modules/pyicloud { }; + pyperf = callPackage ../development/python-modules/pyperf { }; pefile = callPackage ../development/python-modules/pefile { }; |