48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ pkgs, ... }:
|
|
let
|
|
uart-wifi = pkgs.python3Packages.buildPythonPackage rec {
|
|
pname = "uart-wifi";
|
|
version = "0.2.1";
|
|
format = "pyproject";
|
|
src = pkgs.fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "sha256-yquZ5V8f+EqetCf0nc9WlhHhnHkOASYRuYvqEIMc5HI=";
|
|
};
|
|
|
|
buildInputs = with pkgs.python3Packages; [ setuptools ];
|
|
|
|
doCheck = false; # no tests in the PyPI tarball
|
|
};
|
|
|
|
ha-anycubic = pkgs.buildHomeAssistantComponent rec {
|
|
owner = "adamoutler";
|
|
domain = "anycubic_wifi";
|
|
version = "HACS-10";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = owner;
|
|
repo = "anycubic-homeassistant";
|
|
rev = version;
|
|
hash = "sha256-TfZadwgdEJR11MaL+nfIgEYld3trWg3v6lOHSoxQ98Q=";
|
|
};
|
|
|
|
# PYTHONPATH = [ "${src}/uart-wifi" ];
|
|
|
|
propagatedBuildInputs = [
|
|
uart-wifi
|
|
];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/adamoutler/anycubic-homeassistant/releases/tag/${version}";
|
|
description = "This is a library to provide support for Mono X Printers.";
|
|
homepage = "https://github.com/adamoutler/anycubic-homeassistant";
|
|
maintainers = [ ];
|
|
};
|
|
};
|
|
in
|
|
{
|
|
services.home-assistant.customComponents = [
|
|
ha-anycubic
|
|
];
|
|
}
|