Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

home-assistant: make hass cloud integration work #38653

Merged
merged 3 commits into from Apr 16, 2018

Conversation

peterhoeg
Copy link
Member

Motivation for this change

I'd like to use my "Amazon ~~~spy-device~~~ Echo" to control home assistant.

I haven't actually tried to use it to control HA yet but at least it's connecting.

Should I separate out the pycryptodome override into its own file?

Cc: @dotlambda @FRidh

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase on staging, pycryptodome has been updated there.

@@ -317,6 +317,14 @@ in {

pycryptodome = callPackage ../development/python-modules/pycryptodome { };

pycryptodome_3_3 = self.pycryptodome.overridePythonAttrs (oldAttrs: rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a policy of having only a single version of each package in pythonPackages

sha256 = "0vl22411k394biizkjqg1ydclbf6fw5hxixzm1g7jlpzx4z6j9lj";
};

propagatedBuildInputs = [ cryptography ecdsa future pycryptodome_3_3 six ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably just patch requirements.txt in postPatch.

sha256 = "0gw3crg64p1zx3k5js0wh0x5bldgs7viy4g8hld9xbka8q0374hi";
};

propagatedBuildInputs = [ boto3 envs python-jose-cryptodome requests ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened capless/warrant#98 for using python-jose instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to use that as a patch, which would get rid of all problems.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterhoeg Did you try applying that patch?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, haven't touched this yet. This weekend!

sha256 = "0vl22411k394biizkjqg1ydclbf6fw5hxixzm1g7jlpzx4z6j9lj";
};

propagatedBuildInputs = [ cryptography ecdsa future pycryptodome_3_3 six ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhm this could be a big hassle if python-jose-cryptodome is mixed with something depending on pycryptodome. Then there are two different versions. which should be avoided.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a newer version could be used here? https://github.com/mpdavis/python-jose/blob/master/setup.py#L58

, cryptography, ecdsa, future, pycryptodome_3_3, six }:

buildPythonPackage rec {
pname = "python-jose-cryptodome";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also why did you add another python-jose?

@peterhoeg peterhoeg changed the base branch from master to staging April 16, 2018 02:17
@peterhoeg
Copy link
Member Author

Your issues have been addressed @dotlambda and @Mic92

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: home-assistant

Partial log (click to expand)

tests/components/test_introduction.py .                                  [ 73%]
tests/components/test_logger.py ....                                     [ 75%]
tests/components/test_script.py .....                                    [ 78%]
tests/components/test_shell_command.py ......                            [ 82%]
tests/components/test_system_log.py ...............                      [ 91%]
tests/components/test_websocket_api.py ..............                    [100%]

============================== 1 tests deselected ==============================
================== 163 passed, 1 deselected in 27.12 seconds ===================
/nix/store/d07xmkz56gzzhjfb7m5bhn8qwf5j3agx-homeassistant-0.66.1

@dotlambda dotlambda changed the base branch from staging to master April 16, 2018 05:55
@dotlambda
Copy link
Member

No need to use staging anymore, has been merged into master.

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.envs python3.pkgs.envs

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.envs, python3.pkgs.envs

Partial log (click to expand)

test_tuple_invalid (envs.tests.EnvTestCase) ... ok
test_tuple_valid (envs.tests.EnvTestCase) ... ok
test_wrong_var_type (envs.tests.EnvTestCase) ... ok

----------------------------------------------------------------------
Ran 18 tests in 0.016s

OK
/nix/store/042li0gv31bkpfkcdwin8hc1pziap63q-python2.7-envs-1.2.4
/nix/store/f2xb0i06mr5v7xpcjmb6mknwz4lcfqw3-python3.6-envs-1.2.4

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.warrant python3.pkgs.warrant

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.warrant, python3.pkgs.warrant

Partial log (click to expand)

Successfully installed warrant-0.6.1
/build/source
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/km8yii01860ixjmjc2bi7nqcjcv5wqq9-python3.6-warrant-0.6.1
strip is /nix/store/j7d4mr0ikv974ig7yzhknpsq288js4bs-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/km8yii01860ixjmjc2bi7nqcjcv5wqq9-python3.6-warrant-0.6.1/lib
patching script interpreter paths in /nix/store/km8yii01860ixjmjc2bi7nqcjcv5wqq9-python3.6-warrant-0.6.1
checking for references to /build in /nix/store/km8yii01860ixjmjc2bi7nqcjcv5wqq9-python3.6-warrant-0.6.1...
/nix/store/79kyfmrpacjihq1ha58vvbj68k4zmxaw-python2.7-warrant-0.6.1
/nix/store/km8yii01860ixjmjc2bi7nqcjcv5wqq9-python3.6-warrant-0.6.1


propagatedBuildInputs = [ boto3 envs python-jose requests ];

# all the checks are failing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Their Travis build fails, too. So this is to be expected.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: home-assistant

Partial log (click to expand)

copying path '/nix/store/0sm95q8xlaj9lmvjvdyixwm1g439bs2k-python3.6-home-assistant-frontend-20180404.0' from 'https://cache.nixos.org'...
copying path '/nix/store/2k375nm374jh9j6057wizf87npav4y44-python3.6-yarl-1.1.1' from 'https://cache.nixos.org'...
copying path '/nix/store/9nv569x04z3axnh6gv3zdx78id8za59a-python3.6-pyOpenSSL-17.5.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/2ngk9cs02lb8raj704rk4yaf756p7hz7-python3.6-urllib3-1.22' from 'https://cache.nixos.org'...
copying path '/nix/store/7v6jhcj9v9gm2ryjjysnm1pdxr00lrxj-python3.6-aiohttp-3.1.1' from 'https://cache.nixos.org'...
copying path '/nix/store/769yyh95j92307fg5zbpk9dpfbqkbjix-python3.6-requests-2.18.4-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/h9p5vqb1gxn7p066fvwg5plnmbvjsdab-python3.6-astral-1.6' from 'https://cache.nixos.org'...
copying path '/nix/store/a7wz8k6dnaqynl5nnbiylj5j6f1vlf6c-python3.6-aiohttp-cors-0.7.0' from 'https://cache.nixos.org'...
copying path '/nix/store/122psj6iz4n42dzskg1n0rcbsl9nrqa8-homeassistant-0.67.0' from 'https://cache.nixos.org'...
/nix/store/122psj6iz4n42dzskg1n0rcbsl9nrqa8-homeassistant-0.67.0

@dotlambda dotlambda merged commit b70ad2a into NixOS:master Apr 16, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.envs, python3.pkgs.envs

Partial log (click to expand)

  /nix/store/qnl49gcfcm25s0hyg2rc7hklr3q47qqa-xz-5.2.3
  /nix/store/w17llrglg9xnh5jdacg8y1avhpiq8n1i-python3.6-setuptools-39.0.1
copying path '/nix/store/4d57d7z2y38k62ibb20iha8d99bqbibw-python2.7-setuptools-39.0.1' from 'https://cache.nixos.org'...
copying path '/nix/store/qnl49gcfcm25s0hyg2rc7hklr3q47qqa-xz-5.2.3' from 'https://cache.nixos.org'...
copying path '/nix/store/96wn2gz3mwi71gwcrvpfg39bsymd7gqx-python3-3.6.5' from 'https://cache.nixos.org'...
copying path '/nix/store/2siqm13s12084kpjzgx5m9z6rgjnbi07-python2.7-envs-1.2.4' from 'https://cache.nixos.org'...
copying path '/nix/store/w17llrglg9xnh5jdacg8y1avhpiq8n1i-python3.6-setuptools-39.0.1' from 'https://cache.nixos.org'...
copying path '/nix/store/lxqzh17p3fyykp81mccagiaqh2xx0kz8-python3.6-envs-1.2.4' from 'https://cache.nixos.org'...
/nix/store/2siqm13s12084kpjzgx5m9z6rgjnbi07-python2.7-envs-1.2.4
/nix/store/lxqzh17p3fyykp81mccagiaqh2xx0kz8-python3.6-envs-1.2.4

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.warrant, python3.pkgs.warrant

Partial log (click to expand)

copying path '/nix/store/2kmbsr6wldsfg30i9an1ys5i0668nqf3-python3.6-botocore-1.9.3' from 'https://cache.nixos.org'...
copying path '/nix/store/ail234087c4l25jh4n75x7pw51vychsc-python3.6-pyOpenSSL-17.5.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/ik38k2jxi7v0snxp1c9kmarbiiirld6y-python3.6-python-jose-2.0.2' from 'https://cache.nixos.org'...
copying path '/nix/store/h9wqi67rw7p3kz2rvm4is4l5w6splmgi-python3.6-urllib3-1.22' from 'https://cache.nixos.org'...
copying path '/nix/store/a7b8wh3f94x58ngs6511ghjbs37linvk-python3.6-s3transfer-0.1.13' from 'https://cache.nixos.org'...
copying path '/nix/store/z9vxblmpzfdxagxyg2i3c0rzxdbixgny-python3.6-boto3-1.6.0' from 'https://cache.nixos.org'...
copying path '/nix/store/yrbwn8nzn96pn71sjy846w9d472klrxl-python3.6-requests-2.18.4-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/gffh8gc0rwxvp92qslqh99g55h33llgc-python3.6-warrant-0.6.1' from 'https://cache.nixos.org'...
/nix/store/d8f0p36ssdi820c27xsh162a803pprqr-python2.7-warrant-0.6.1
/nix/store/gffh8gc0rwxvp92qslqh99g55h33llgc-python3.6-warrant-0.6.1

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: home-assistant

Partial log (click to expand)

copying path '/nix/store/y2nl5isrg64d0s4p3gs95rvxhw9bk4f3-python3.6-home-assistant-frontend-20180404.0' from 'https://cache.nixos.org'...
copying path '/nix/store/hn1sn7casb9g44yy6mq2k8xf68lcw00m-python3.6-aiohttp-3.1.1' from 'https://cache.nixos.org'...
copying path '/nix/store/rda6iamdbffhcrvv19mk2l17762rjs3s-python3.6-aiohttp-cors-0.7.0' from 'https://cache.nixos.org'...
copying path '/nix/store/d7md13gqli55hdy91dnwdwjyvv9c09mm-python3.6-cryptography-2.2.2-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/by96m5sg5rba5014szy3bc0571hgpb60-python3.6-pyOpenSSL-17.5.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/nd6h5gnsav5pc2kssbyrmaillcqrhsw5-python3.6-urllib3-1.22' from 'https://cache.nixos.org'...
copying path '/nix/store/0ldyf627wz8kcqls947nha2px9fxpw77-python3.6-requests-2.18.4-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/fn30fl873zr6sir3z7ir3bd9j0wahnzw-python3.6-astral-1.6' from 'https://cache.nixos.org'...
copying path '/nix/store/agavclxsq7w9bd1wgwf1f1y2w9g0v3gg-homeassistant-0.67.0' from 'https://cache.nixos.org'...
/nix/store/agavclxsq7w9bd1wgwf1f1y2w9g0v3gg-homeassistant-0.67.0

@peterhoeg peterhoeg deleted the hass_cloud branch April 17, 2018 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants