6 python3.pkgs.buildPythonApplication rec {
7 pname = "homeassistant-cli";
11 src = fetchFromGitHub {
12 owner = "home-assistant-ecosystem";
13 repo = "home-assistant-cli";
15 hash = "sha256-4OeHJ7icDZUOC5K4L0F0Nd9lbJPgdW4LCU0wniLvJ1Q=";
19 # Ignore pinned versions
20 sed -i "s/'\(.*\)\(==\|>=\).*'/'\1'/g" setup.py
23 propagatedBuildInputs = with python3.pkgs; [
37 # TODO: Completion needs to be adapted after support for latest click was added
38 # $ source <(_HASS_CLI_COMPLETE=bash_source hass-cli) # for bash
39 # $ source <(_HASS_CLI_COMPLETE=zsh_source hass-cli) # for zsh
40 # $ eval (_HASS_CLI_COMPLETE=fish_source hass-cli) # for fish
42 # mkdir -p "$out/share/bash-completion/completions" "$out/share/zsh/site-functions"
43 # $out/bin/hass-cli completion bash > "$out/share/bash-completion/completions/hass-cli"
44 # $out/bin/hass-cli completion zsh > "$out/share/zsh/site-functions/_hass-cli"
47 nativeCheckInputs = with python3.pkgs; [
52 pythonImportsCheck = [
57 description = "Command-line tool for Home Assistant";
58 mainProgram = "hass-cli";
59 homepage = "https://github.com/home-assistant-ecosystem/home-assistant-cli";
60 changelog = "https://github.com/home-assistant-ecosystem/home-assistant-cli/releases/tag/${version}";
61 license = licenses.asl20;
62 maintainers = teams.home-assistant.members;