aboutsummaryrefslogtreecommitdiff
path: root/pkgs/servers/home-assistant/cli.nix
diff options
context:
space:
mode:
authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-12-12 14:00:44 +0100
committerRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-12-19 15:54:28 +0100
commit52b1973283aca1c36852e25da97a8e8f06e6d642 (patch)
treecf20ce6963c19fd7b5d935e3b76ec3b2656f4f1a /pkgs/servers/home-assistant/cli.nix
parent407f9ba5c9ec325c43fb466e9e51cab9e1713eaf (diff)
home-assistant-cli: init at 0.3.0
Diffstat (limited to 'pkgs/servers/home-assistant/cli.nix')
-rw-r--r--pkgs/servers/home-assistant/cli.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/servers/home-assistant/cli.nix b/pkgs/servers/home-assistant/cli.nix
new file mode 100644
index 00000000000..c889610963d
--- /dev/null
+++ b/pkgs/servers/home-assistant/cli.nix
@@ -0,0 +1,35 @@
+{ lib, python3 }:
+
+python3.pkgs.buildPythonApplication rec {
+ pname = "homeassistant-cli";
+ version = "0.3.0";
+
+ src = python3.pkgs.fetchPypi {
+ inherit pname version;
+ sha256 = "42d7cb008801d7a448b62aed1fc46dd450ee67397bf16faabb02f691417db4b2";
+ };
+
+ postPatch = ''
+ # Ignore pinned versions
+ sed -i "s/'\(.*\)==.*'/'\1'/g" setup.py
+ '';
+
+ propagatedBuildInputs = with python3.pkgs; [
+ requests pyyaml netdisco click click-log tabulate idna jsonpath_rw jinja2
+ ];
+
+ checkInputs = with python3.pkgs; [
+ pytest requests-mock
+ ];
+
+ checkPhase = ''
+ pytest
+ '';
+
+ meta = with lib; {
+ description = "Command-line tool for Home Asssistant";
+ homepage = https://github.com/home-assistant/home-assistant-cli;
+ license = licenses.asl20;
+ maintainers = with maintainers; [ dotlambda ];
+ };
+}