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: add multiple dependencies #36108
Conversation
Failure on x86_64-linux (full log) Partial log (click to expand)
|
@peterhoeg Do you have an idea for a simple test involving AppDaemon that could be added to https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/home-assistant.nix? |
pkgs/top-level/python-packages.nix
Outdated
@@ -629,16 +629,15 @@ in { | |||
arrow = callPackage ../development/python-modules/arrow { }; | |||
|
|||
async = buildPythonPackage rec { | |||
name = "async-0.6.1"; | |||
disabled = isPy3k; | |||
name = "async-0.6.2"; | |||
meta.maintainers = with maintainers; [ ]; | |||
|
|||
buildInputs = with self; [ pkgs.zlib ]; | |||
doCheck = false; | |||
|
|||
src = pkgs.fetchurl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetchPypi
pkgs/top-level/python-packages.nix
Outdated
@@ -629,16 +629,15 @@ in { | |||
arrow = callPackage ../development/python-modules/arrow { }; | |||
|
|||
async = buildPythonPackage rec { | |||
name = "async-0.6.1"; | |||
disabled = isPy3k; | |||
name = "async-0.6.2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pname
, version
pkgs/top-level/python-packages.nix
Outdated
@@ -629,16 +629,15 @@ in { | |||
arrow = callPackage ../development/python-modules/arrow { }; | |||
|
|||
async = buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that's okay, I'd ask you to move the package to development/python-modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should prefix all but the last commit messages with pythonPackages.
propagatedBuildInputs = [ requests six ]; | ||
|
||
# it doesn't find any tests to run and then errors out | ||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably fetch from GitHub in that case. I've opened an upstream PR: btubbs/sseclient#12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK with things this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update is already available :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated it to 0.0.19 and enabled the tests.
description = "Provide an interface to the Yahoo! Weather RSS feed"; | ||
homepage = https://github.com/pvizeli/yahooweather; | ||
license = licenses.bsd2; | ||
maintainers = with lib.maintainers; [ peterhoeg ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no lib
|
||
buildPythonPackage rec { | ||
pname = "appdaemon"; | ||
version = "3.0.0b3"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you intentionally use a beta version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started with the latest release version but there were dependency version conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will probably be a problem in the future as well. However, I think AppDaemon is never used as a library even though the import
statements on http://appdaemon.readthedocs.io/en/stable/APPGUIDE.html suggest otherwise. These apps that import the homeassistant.appdaemon
module are not executables on their own but imported by AppDaemon.
This means we can move appdaemon
oy of pythonPackages
without a problem. You might want to create an appdaemon.nix
file in the servers/home-assistant
directory.
Then, we can pin the versions of AppDaemon's dependencies to whatever is needed, just like in https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/home-assistant/default.nix.
I leave choosing the beta or the stable version up to you :)
@peterhoeg Thanks for packaging AppDaemon! We should probably add an AppDaemon option to the home-assistant module, something like |
and
I don't have it running yet as I haven't had the time to look at it but I will be using it for "HADashboard". I think we can always add those later (tests and nixos module). |
As for all the other comments, I'll get those cleaned up later tonight. |
Okay, then whoever first has a running AppDaemon config and the necessary time can add the module options and an appropriate test. |
Failure on aarch64-linux (full log) Partial log (click to expand)
|
I don't know, @peterhoeg. Is there something I should dig in to? |
Nothing to dig into, it's pytest-mock:
|
8979fee
to
9eef65b
Compare
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Failure on aarch64-linux (full log) Partial log (click to expand)
|
@peterhoeg Please see my comment regarding the AppDaemon expression. @GrahamcOfBorg build pythonPackages.websocket-client python3Packages.websocket-client pythonPackages.aiohttp-jinja2 python3Packages.aiohttp-jinja2 pythonPackages.deluge-client python3Packages.deluge-client pythonPackages.sseclient python3Packages.sseclient pythonPackages.async python3Packages.async pythonPackages.yahooweather python3Packages.yahooweather pythonPackages.ha-ffmpeg python3Packages.ha-ffmpeg |
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Failure on aarch64-linux (full log) Partial log (click to expand)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's best to rebase on staging so we can test aiohttp-jinja2, which requires pytest-mock
sha256 = "048zfidv08sr4hivdd3xxf1pywhqbnszj5qcn51h2f4y1588fhpf"; | ||
}; | ||
|
||
# it will try to connect to a running instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could start one in preCheck
?
buildPythonPackage rec { | ||
pname = "ha-ffmpeg"; | ||
version = "1.9"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add disabled = !isPy3k
: https://github.com/pvizeli/ha-ffmpeg/blob/master/setup.py#L26
propagatedBuildInputs = [ requests six ]; | ||
|
||
# it doesn't find any tests to run and then errors out | ||
doCheck = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update is already available :)
buildPythonPackage rec { | ||
pname = "yahooweather"; | ||
version = "0.10"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably needs to be disabled for Python 2 as well: https://github.com/pvizeli/yahooweather/blob/master/setup.py#L27
inherit pname version; | ||
sha256 = "0bsxmngkpzvqm50i2cnxjzhpbdhb8s10ly8h5q08696cjihqdkpa"; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Tests require network access
doCheck = false;
See https://github.com/pvizeli/yahooweather/blob/master/test.py
pkgs/top-level/python-packages.nix
Outdated
@@ -21394,6 +21393,8 @@ EOF | |||
pysigset = callPackage ../development/python-modules/pysigset { }; | |||
|
|||
us = callPackage ../development/python-modules/us { }; | |||
|
|||
websocket-client = callPackage ../development/python-modules/websocket-client { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already packaged. It is called websocket_client
.
buildInputs = [ ffmpeg ]; | ||
|
||
propagatedBuildInputs = [ async-timeout ]; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# only manual tests
doCheck = false;
, zlib }: | ||
|
||
# The only user of this is "appdaemon" and we should drop it when appdaemon moves away from it: | ||
# https://github.com/home-assistant/appdaemon/issues/246 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering why ofborg labeled 11-100 rebuilds, then. However, I cannot find any other users of async as well
@peterhoeg Do you want me to do the changes? |
If you have the time, of course!! |
I know it has disadvantages, but that's the way @FRidh taught to me :D |
I have now removed async from the package set because AppDaemon/appdaemon#252 was merged. |
Success on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
Citing from PyPI: DEPRECATION NOTE: Please do not use this library ! It’s not working correctly in python 3, and besides that might be called a failed experiment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterhoeg Feel free to merge.
Thanks for your help! |
Failure on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-linux (full log) Partial log (click to expand)
|
I merged this into |
Afaik it is merged regularly, i.e. when about as many jobs fail in the staging jobset as there are failing jobs in the trunk jobset. You'd have to cherry-pick some more commits if you want to use this btw, e.g. the one concerning pytest-mock. |
I have a bunch of local patches here anyway (including reverting pytest-mock) so I'll continue carrying what is needed locally until it hits master (and subsequently unstable). |
Motivation for this change
Bits missing for home-assistant.
Cc: @dotlambda @FRidh
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)