feat: expose pydeconz

Expose pydeconz via the nix flake.
This commit is contained in:
Maurice B. Lewis 2020-10-11 08:13:22 +00:00
parent 67328a0745
commit 0c59324f0a
No known key found for this signature in database
GPG key ID: 4BBC645F979A88FA
3 changed files with 31 additions and 29 deletions

View file

@ -22,6 +22,9 @@
overlays = {
deconz = self: super: {
deconz = self.qt5.callPackage ./pkgs/deconz { };
# This is the path so that the correct python deps and versions can be used
# with python{version}Packages.callPackage pydeconz { }
pydeconz = ./pkgs/pydeconz;
};
};
systemModule = { hostName, hardwareConfig, config }:

15
pkgs/pydeconz/default.nix Normal file
View file

@ -0,0 +1,15 @@
{ buildPythonPackage, fetchPypi, setuptools, aiohttp }:
buildPythonPackage rec {
pname = "pydeconz";
version = "73";
src = fetchPypi {
inherit pname version;
sha256 = "Lm7J0p2dp2gyesDpgN0WGpxPewC1z/IUy0CDEqofQGA=";
};
propagateBuildInputs = [ setuptools ];
buildInputs = [ aiohttp ];
doCheck = false;
}

View file

@ -1,22 +1,6 @@
{ config, pkgs, ... }:
{ config, pkgs, pydeconz, ... }:
with pkgs;
let
pydeconz = python3.pkgs.buildPythonPackage rec {
pname = "pydeconz";
version = "73";
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "Lm7J0p2dp2gyesDpgN0WGpxPewC1z/IUy0CDEqofQGA=";
};
propagateBuildInputs = with python3Packages; [ setuptools ];
buildInputs = with python3Packages; [ aiohttp ];
doCheck = false;
};
in
{
with pkgs; {
imports = [ ./deconz.nix ];
environment.systemPackages = with pkgs; [ deconz ];
@ -31,7 +15,7 @@ in
services.home-assistant = {
enable = true;
package = home-assistant.override {
extraPackages = ps: with ps; [ pydeconz ];
extraPackages = ps: [ (ps.callPackage pydeconz { }) ];
};
openFirewall = true;
config = {