diff mbox series

[bug#60316] WIP: Add homeassistant.

Message ID znLeCLDDKDEAuidADwa4L37YXCFmY8MRGVnIFwtk9zLJm8-Rlp-W7sJE51_TX9pKULrR81C6oOa6LCZ0LphgU27otG_eU696FPXlPwobo5I=@protonmail.com
State New
Headers show
Series [bug#60316] WIP: Add homeassistant. | expand

Commit Message

phodina Dec. 25, 2022, 5:24 p.m. UTC
Hi,

I'd love to add Home assistant to Guix to liberate our homes :-D

However, it has one nasty problem. There's one Python module 'orjson' which depends on rust package [1]. Since it would mean to add a lot of Rust packages I'd like to ask for help if there isn't a better way to build the package 'orjson'? [2]

FIY Marius I saw you patch set where you mentioned module 'orjson' as test dependency [3]

Just out of curiosity have you been able to package the Home assistant? [4]

$ /gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/bin/hass
Traceback (most recent call last):
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/bin/.hass-real", line 5, in <module>
sys.exit (mod.main ())
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/__main__.py", line 169, in main
args = get_arguments()
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/__main__.py", line 69, in get_arguments
from . import config as config_util
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/config.py", line 20, in <module>
from . import auth
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/auth/__init__.py", line 12, in <module>
from homeassistant import data_entry_flow
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 16, in <module>
from .core import HomeAssistant, callback
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/core.py", line 46, in <module>
from . import block_async_io, loader, util
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/loader.py", line 34, in <module>
from .helpers.json import JSON_DECODE_EXCEPTIONS, json_loads
File "/gnu/store/8dgdzxj7vvawbd77q405fbjm4rnjdxld-homeassistant-2022.12.8/lib/python3.9/site-packages/homeassistant/helpers/json.py", line 7, in <module>
import orjsonModuleNotFoundError: No module named 'orjson'

1 https://github.com/PyO3/maturin
2 https://github.com/ijl/orjson/blob/master/pyproject.toml3 https://issues.guix.gnu.org/58587
4 https://community.home-assistant.io/t/packaging-home-assistant-into-guix/264117

----
Petr

Comments

Raghav Gururajan Dec. 26, 2022, 5:11 a.m. UTC | #1
Petr,

> I'd love to add Home assistant to Guix to liberate our homes :-D

Woah! Thanks so much for working on this. I've been eyeing at 
homeassitant for a while. :D

> However, it has one nasty problem. There's one Python module 'orjson' which depends on rust package [1]. Since it would mean to add a lot of Rust packages I'd like to ask for help if there isn't a better way to build the package 'orjson'?

I'd like to help. Let's see if we can avoid that dependency. If we 
can't, I'll aid this work with packing the related rust packages.


> Just out of curiosity have you been able to package the Home assistant?

Darn! I forgot that I created that post. I must've working on that and 
lost the work because of SSD failure happened midst 2021. :(

Regards,
RG.
diff mbox series

Patch

From 8859d65e8236009ebe605ab8089958ae2c1ef35a Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sun, 25 Dec 2022 17:04:06 +0100
Subject: [PATCH 10/11] gnu: Add python-home-assistant-bluetooth.

* gnu/packages/python-xyz.scm (python-home-assistant-bluetooth): New
variable.

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bb734ee6ea..c4eb7aaba6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8479,6 +8479,25 @@  (define-public python-gridmap
 cluster without needing to write any wrapper code yourself.")
     (license license:gpl3+)))
 
+(define-public python-home-assistant-bluetooth
+  (package
+    (name "python-home-assistant-bluetooth")
+    (version "1.9.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "home_assistant_bluetooth" version))
+              (sha256
+               (base32
+                "0jcb7l8pn30dsh3rhkcmd5h9b7r7igpqi4kk9wz0lzlqi0568a45"))))
+    (build-system python-build-system)
+    (propagated-inputs (list python-bleak))
+    (home-page
+     "https://github.com/home-assistant-libs/home-assistant-bluetooth")
+    (synopsis "Home Assistant Bluetooth Models and Helpers")
+    (description "This package provides helpers for accessing Home
+Assistant Bluetooth models.")
+    (license license:asl2.0)))
+
 (define-public python-honcho
   (package
     (name "python-honcho")
-- 
2.38.1