aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/servers/home-assistant/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/home-assistant/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/home-assistant/default.nix46
1 files changed, 30 insertions, 16 deletions
diff --git a/nixpkgs/pkgs/servers/home-assistant/default.nix b/nixpkgs/pkgs/servers/home-assistant/default.nix
index 2d6d7347455..17ce095e393 100644
--- a/nixpkgs/pkgs/servers/home-assistant/default.nix
+++ b/nixpkgs/pkgs/servers/home-assistant/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, fetchFromGitHub, fetchpatch, python3, protobuf3_6
+{ stdenv, nixosTests, lib, fetchurl, fetchFromGitHub, fetchpatch, python3, protobuf3_6
# Look up dependencies of specified components in component-packages.nix
, extraComponents ? [ ]
@@ -22,17 +22,18 @@ let
defaultOverrides = [
# Override the version of some packages pinned in Home Assistant's setup.py
- # used by check_config script
- # can be unpinned once https://github.com/home-assistant/home-assistant/issues/11917 is resolved
- (mkOverride "colorlog" "4.0.2"
- "3cf31b25cbc8f86ec01fef582ef3b840950dea414084ed19ab922c8b493f9b42")
+ # required by the sun/moon plugins
+ # https://github.com/home-assistant/core/issues/36636
+ (mkOverride "astral" "1.10.1"
+ "d2a67243c4503131c856cafb1b1276de52a86e5b8a1d507b7e08bee51cb67bf1")
- # required by aioesphomeapi
- (self: super: {
- protobuf = super.protobuf.override {
- protobuf = protobuf3_6;
- };
- })
+ # We have 3.x in nixpkgs which is incompatible with home-assistant atm:
+ # https://github.com/home-assistant/core/blob/dev/requirements_all.txt
+ (mkOverride "pyowm" "2.10.0"
+ "1xvcv3sbcn9na8cwz21nnjlixysfk5lymnf65d1nqkbgacc1mm4g")
+
+ (mkOverride "bcrypt" "3.1.7"
+ "0hhywhxx301cxivgxrpslrangbfpccc8y83qbwn1f57cab3nj00b")
# hass-frontend does not exist in python3.pkgs
(self: super: {
@@ -67,7 +68,7 @@ let
extraBuildInputs = extraPackages py.pkgs;
# Don't forget to run parse-requirements.py after updating
- hassVersion = "0.110.1";
+ hassVersion = "0.114.4";
in with py.pkgs; buildPythonApplication rec {
pname = "homeassistant";
@@ -76,7 +77,7 @@ in with py.pkgs; buildPythonApplication rec {
disabled = pythonOlder "3.5";
patches = [
- ./0001-setup.py-relax-dependencies.patch
+ ./relax-dependencies.patch
];
inherit availableComponents;
@@ -86,9 +87,14 @@ in with py.pkgs; buildPythonApplication rec {
owner = "home-assistant";
repo = "core";
rev = version;
- sha256 = "1495kl997mvk9k11lk1ahv5w0yc0185qmxwa1h51j6d0zyqwz749";
+ sha256 = "0k9px4ny0b72d9ysr3x72idprgfgjab1z91ildr87629826bb4n7";
};
+ postPatch = ''
+ substituteInPlace setup.py \
+ --replace "yarl==1.4.2" "yarl~=1.4"
+ '';
+
propagatedBuildInputs = [
# From setup.py
aiohttp astral async-timeout attrs bcrypt certifi importlib-metadata jinja2
@@ -109,9 +115,14 @@ in with py.pkgs; buildPythonApplication rec {
# - components' dependencies are not included, so they cannot be tested
# - test_merge_id_schema requires pyqwikswitch
# - test_loader.py tries to load not-packaged dependencies
+ # - test_notify pyotp doesn't like the short mock keys
# - unclear why test_merge fails: assert merge_log_err.call_count != 0
# - test_setup_safe_mode_if_no_frontend: requires dependencies for components we have not packaged
- py.test --ignore tests/components --ignore tests/test_loader.py -k "not test_setup_safe_mode_if_no_frontend and not test_merge_id_schema and not test_merge"
+ py.test \
+ --ignore tests/components \
+ --ignore tests/test_loader.py \
+ --ignore tests/auth/mfa_modules/test_notify.py \
+ -k "not test_setup_safe_mode_if_no_frontend and not test_merge_id_schema and not test_merge"
# Some basic components should be tested however
py.test \
@@ -123,12 +134,15 @@ in with py.pkgs; buildPythonApplication rec {
passthru = {
inherit (py.pkgs) hass-frontend;
+ tests = {
+ inherit (nixosTests) home-assistant;
+ };
};
meta = with lib; {
homepage = "https://home-assistant.io/";
description = "Open-source home automation platform running on Python 3";
license = licenses.asl20;
- maintainers = with maintainers; [ dotlambda globin mic92 ];
+ maintainers = with maintainers; [ dotlambda globin mic92 hexa ];
};
}