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: 0.91.4 -> 0.92.2 #60217

Merged
merged 9 commits into from May 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 13 additions & 22 deletions nixos/modules/services/misc/home-assistant.nix
Expand Up @@ -21,32 +21,23 @@ let

availableComponents = cfg.package.availableComponents;

# Given component "parentConfig.platform", returns whether config.parentConfig
# is a list containing a set with set.platform == "platform".
usedPlatforms = config:
if isAttrs config then
optional (config ? platform) config.platform
++ concatMap usedPlatforms (attrValues config)
else if isList config then
concatMap usedPlatforms config
else [ ];

# Given a component "platform", looks up whether it is used in the config
# as `platform = "platform";`.
#
# For example, the component sensor.luftdaten is used as follows:
# For example, the component mqtt.sensor is used as follows:
# config.sensor = [ {
# platform = "luftdaten";
# platform = "mqtt";
# ...
# } ];
#
# Beginning with 0.87 Home Assistant is migrating their components to the
# scheme "platform.subComponent", e.g. "hue.light" instead of "light.hue".
# See https://developers.home-assistant.io/blog/2019/02/19/the-great-migration.html.
# Hence, we also check whether we find an entry in the config when interpreting
# the first part of the path as the component.
useComponentPlatform = component:
let
path = splitString "." component;
# old: platform is the last part of path
parentConfig = attrByPath (init path) null cfg.config;
platform = last path;
# new: platform is the first part of the path
parentConfig' = attrByPath (tail path) null cfg.config;
platform' = head path;
in
(isList parentConfig && any (item: item.platform or null == platform) parentConfig)
|| (isList parentConfig' && any (item: item.platform or null == platform') parentConfig');
useComponentPlatform = component: elem component (usedPlatforms cfg.config);

# Returns whether component is used in config
useComponent = component:
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pychromecast/default.nix
Expand Up @@ -2,11 +2,11 @@

buildPythonPackage rec {
pname = "PyChromecast";
version = "3.2.0";
version = "3.2.1";

src = fetchPypi {
inherit pname version;
sha256 = "0jksh7rb4880kni8iw3hb5q9dm5gi40zmx4r2fwydnpfhadhq5af";
sha256 = "e1e71e30581e1021b6bdd50a80cfcdcfa86d9082171fdd719c5ca6a77b8a9699";
};

disabled = !isPy3k;
Expand Down
14 changes: 8 additions & 6 deletions pkgs/development/python-modules/python-slugify/default.nix
@@ -1,17 +1,19 @@
{ stdenv, fetchPypi, buildPythonPackage, unidecode, regex, isPy3k }:
{ stdenv, fetchPypi, buildPythonPackage, python, text-unidecode }:

buildPythonPackage rec {
pname = "python-slugify";
version = "2.0.1";
version = "3.0.2";

src = fetchPypi {
inherit pname version;
sha256 = "d3e034397236020498e677a35e5c05dcc6ba1624b608b9ef7e5fe3090ccbd5a8";
sha256 = "57163ffb345c7e26063435a27add1feae67fa821f1ef4b2f292c25847575d758";
};
doCheck = !isPy3k;
# (only) on python3 unittest loader (loadTestsFromModule) fails

propagatedBuildInputs = [ unidecode regex ];
propagatedBuildInputs = [ text-unidecode ];

checkPhase = ''
${python.interpreter} test.py
'';

meta = with stdenv.lib; {
homepage = https://github.com/un33k/python-slugify;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pytz/default.nix
Expand Up @@ -2,11 +2,11 @@

buildPythonPackage rec {
pname = "pytz";
version = "2018.9";
version = "2019.1";

src = fetchPypi {
inherit pname version;
sha256 = "d5f05e487007e29e03409f9398d074e158d920d36eb82eaf66fb1136b0c5374c";
sha256 = "d747dd3d23d77ef44c6a3526e274af6efeb0a6f1afd5a69ba4d5be4098c8e141";
};

checkPhase = ''
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pytzdata/default.nix
Expand Up @@ -2,11 +2,11 @@

buildPythonPackage rec {
pname = "pytzdata";
version = "2018.9";
version = "2019.1";

src = fetchPypi {
inherit pname version;
sha256 = "dddaaf4f1717820a6fdcac94057e03c1a15b3829a44d9eaf19988917977db408";
sha256 = "f0469062f799c66480fcc7eae69a8270dc83f0e6522c0e70db882d6bd708d378";
};

# No tests
Expand Down
8 changes: 4 additions & 4 deletions pkgs/servers/home-assistant/appdaemon.nix
Expand Up @@ -24,10 +24,10 @@ let
});

jinja2 = super.jinja2.overridePythonAttrs (oldAttrs: rec {
version = "2.10";
version = "2.10.1";
src = oldAttrs.src.override {
inherit version;
sha256 = "f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4";
sha256 = "065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013";
};
});

Expand All @@ -52,11 +52,11 @@ let

in python.pkgs.buildPythonApplication rec {
pname = "appdaemon";
version = "3.0.4";
version = "3.0.5";

src = python.pkgs.fetchPypi {
inherit pname version;
sha256 = "e2393b5e0bb34e94e61f5debc95ad74c1c6929635b74bf8ba15c22b40cbdec69";
sha256 = "623897ce08dc2efe24d04380df36e4b7fb35c0e4007e882857d4047f0b60349d";
};

propagatedBuildInputs = with python.pkgs; [
Expand Down