Merge pull request #36108 from peterhoeg/p/ha-deps

home-assistant: add multiple dependencies
This commit is contained in:
Peter Hoeg 2018-03-05 07:22:08 +08:00 committed by GitHub
commit 0b8401c4aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 221 additions and 20 deletions

View file

@ -0,0 +1,26 @@
{ lib, stdenv, buildPythonPackage, fetchPypi, aiohttp, jinja2, pytest, pytest-aiohttp }:
buildPythonPackage rec {
pname = "aiohttp-jinja2";
version = "0.16.0";
src = fetchPypi {
inherit pname version;
sha256 = "1ps182yrc5g9ph55927a7ssqx6m9kx0bivfxpaj8sa3znrdkl94d";
};
propagatedBuildInputs = [ aiohttp jinja2 ];
checkInputs = [ pytest pytest-aiohttp ];
checkPhase = ''
py.test
'';
meta = with lib; {
description = "Jinja2 support for aiohttp";
homepage = https://github.com/aio-libs/aiohttp_jinja2;
license = licenses.asl20;
maintainers = with maintainers; [ peterhoeg ];
};
}

View file

@ -0,0 +1,21 @@
{ stdenv, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "deluge-client";
version = "1.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "048zfidv08sr4hivdd3xxf1pywhqbnszj5qcn51h2f4y1588fhpf";
};
# it will try to connect to a running instance
doCheck = false;
meta = with stdenv.lib; {
description = "Lightweight pure-python rpc client for deluge";
homepage = https://github.com/JohnDoee/deluge-client;
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
};
}

View file

@ -0,0 +1,28 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy3k
, ffmpeg, async-timeout }:
buildPythonPackage rec {
pname = "ha-ffmpeg";
version = "1.9";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "0644j5fqw8p6li6nrnm1rw7nhvsixq1c7gik3f1yx50776yg05i8";
};
buildInputs = [ ffmpeg ];
propagatedBuildInputs = [ async-timeout ];
# only manual tests
doCheck = false;
meta = with stdenv.lib; {
homepage = https://github.com/pvizeli/ha-ffmpeg;
description = "Library for home-assistant to handle ffmpeg";
license = licenses.bsd3;
maintainers = with maintainers; [ peterhoeg ];
};
}

View file

@ -0,0 +1,18 @@
{ stdenv, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "miniupnpc";
version = "2.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "0ca94zz7sr2x57j218aypxqcwkr23n8js30f3yrvvqbg929nr93y";
};
meta = with stdenv.lib; {
description = "miniUPnP client";
homepage = http://miniupnp.free.fr/;
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
};
}

View file

@ -0,0 +1,24 @@
{ stdenv, buildPythonPackage, fetchPypi
, requests, six
, backports_unittest-mock, pluggy, pytest, pytestrunner }:
buildPythonPackage rec {
pname = "sseclient";
version = "0.0.19";
src = fetchPypi {
inherit pname version;
sha256 = "7a2ea3f4c8525ae9a677bc8193df5db88e23bcaafcc34938a1ee665975703a9f";
};
propagatedBuildInputs = [ requests six ];
checkInputs = [ backports_unittest-mock pytest pytestrunner ];
meta = with stdenv.lib; {
description = "Client library for reading Server Sent Event streams";
homepage = https://github.com/btubbs/sseclient;
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
};
}

View file

@ -0,0 +1,23 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k }:
buildPythonPackage rec {
pname = "yahooweather";
version = "0.10";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "0bsxmngkpzvqm50i2cnxjzhpbdhb8s10ly8h5q08696cjihqdkpa";
};
# Tests require network access
doCheck = false;
meta = with lib; {
description = "Provide an interface to the Yahoo! Weather RSS feed";
homepage = https://github.com/pvizeli/yahooweather;
license = licenses.bsd2;
maintainers = with maintainers; [ peterhoeg ];
};
}

View file

@ -0,0 +1,62 @@
{ lib, python3, fetchpatch }:
let
python = python3.override {
packageOverrides = self: super: {
aiohttp = super.aiohttp.overridePythonAttrs (oldAttrs: rec {
version = "2.3.10";
src = oldAttrs.src.override {
inherit version;
sha256 = "8adda6583ba438a4c70693374e10b60168663ffa6564c5c75d3c7a9055290964";
};
});
yarl = super.yarl.overridePythonAttrs (oldAttrs: rec {
version = "1.1.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "6af895b45bd49254cc309ac0fe6e1595636a024953d710e01114257736184698";
};
});
aiohttp-jinja2 = super.aiohttp-jinja2.overridePythonAttrs (oldAttrs: rec {
version = "0.15.0";
src = oldAttrs.src.override {
inherit version;
sha256 = "0f390693f46173d8ffb95669acbb0e2a3ec54ecce676703510ad47f1a6d9dc83";
};
});
};
};
in python.pkgs.buildPythonApplication rec {
pname = "appdaemon";
version = "3.0.0b4";
src = python.pkgs.fetchPypi {
inherit pname version;
sha256 = "0dfc37ecd8e1344001d4970d32813c581aba1385cf3b82c69f8b7df2eca6c019";
};
patches = fetchpatch {
url = "${meta.homepage}/pull/252.patch";
sha256 = "164qvgdibd2645yxm4n16bhnan13wrchfi70jp2ff806fwdg9mg0";
};
propagatedBuildInputs = with python.pkgs; [
aiohttp aiohttp-jinja2 astral bcrypt daemonize feedparser iso8601
jinja2 pyyaml requests sseclient voluptuous websocket_client yarl
];
# no tests implemented
doCheck = false;
meta = with lib; {
description = "Sandboxed python execution environment for writing automation apps for Home Assistant";
homepage = https://github.com/home-assistant/appdaemon;
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg dotlambda ];
};
}

View file

@ -95,7 +95,7 @@
"envisalink" = ps: with ps; [ ];
"fan.xiaomi_miio" = ps: with ps; [ ];
"feedreader" = ps: with ps; [ feedparser ];
"ffmpeg" = ps: with ps; [ ];
"ffmpeg" = ps: with ps; [ ha-ffmpeg ];
"frontend" = ps: with ps; [ user-agents ];
"gc100" = ps: with ps; [ ];
"goalfeed" = ps: with ps; [ ];
@ -272,7 +272,7 @@
"sensor.crimereports" = ps: with ps; [ ];
"sensor.cups" = ps: with ps; [ ];
"sensor.darksky" = ps: with ps; [ ];
"sensor.deluge" = ps: with ps; [ ];
"sensor.deluge" = ps: with ps; [ deluge-client ];
"sensor.deutsche_bahn" = ps: with ps; [ ];
"sensor.dht" = ps: with ps; [ ];
"sensor.discogs" = ps: with ps; [ discogs_client ];
@ -365,7 +365,7 @@
"sensor.xbox_live" = ps: with ps; [ ];
"sensor.yahoo_finance" = ps: with ps; [ ];
"sensor.yr" = ps: with ps; [ xmltodict ];
"sensor.yweather" = ps: with ps; [ ];
"sensor.yweather" = ps: with ps; [ yahooweather ];
"shiftr" = ps: with ps; [ paho-mqtt ];
"skybell" = ps: with ps; [ ];
"sleepiq" = ps: with ps; [ ];
@ -374,7 +374,7 @@
"switch.acer_projector" = ps: with ps; [ pyserial ];
"switch.anel_pwrctrl" = ps: with ps; [ ];
"switch.broadlink" = ps: with ps; [ ];
"switch.deluge" = ps: with ps; [ ];
"switch.deluge" = ps: with ps; [ deluge-client ];
"switch.digitalloggers" = ps: with ps; [ ];
"switch.dlink" = ps: with ps; [ ];
"switch.edimax" = ps: with ps; [ ];
@ -409,7 +409,7 @@
"tts.microsoft" = ps: with ps; [ ];
"twilio" = ps: with ps; [ twilio ];
"updater" = ps: with ps; [ distro ];
"upnp" = ps: with ps; [ ];
"upnp" = ps: with ps; [ miniupnpc ];
"usps" = ps: with ps; [ ];
"vacuum.roomba" = ps: with ps; [ ];
"vacuum.xiaomi_miio" = ps: with ps; [ ];
@ -425,7 +425,7 @@
"weather.darksky" = ps: with ps; [ ];
"weather.metoffice" = ps: with ps; [ ];
"weather.openweathermap" = ps: with ps; [ ];
"weather.yweather" = ps: with ps; [ ];
"weather.yweather" = ps: with ps; [ yahooweather ];
"wemo" = ps: with ps; [ ];
"wink" = ps: with ps; [ ];
"xiaomi_aqara" = ps: with ps; [ ];

View file

@ -12058,6 +12058,8 @@ with pkgs;
apacheHttpdPackages = apacheHttpdPackagesFor pkgs.apacheHttpd pkgs.apacheHttpdPackages;
apacheHttpdPackages_2_4 = apacheHttpdPackagesFor pkgs.apacheHttpd_2_4 pkgs.apacheHttpdPackages_2_4;
appdaemon = callPackage ../servers/home-assistant/appdaemon.nix { };
archiveopteryx = callPackage ../servers/mail/archiveopteryx/default.nix { };
atlassian-confluence = callPackage ../servers/atlassian/confluence.nix { };

View file

@ -241,6 +241,8 @@ in {
hdf5 = pkgs.hdf5-mpi;
};
ha-ffmpeg = callPackage ../development/python-modules/ha-ffmpeg { };
habanero = callPackage ../development/python-modules/habanero { };
i3ipc = callPackage ../development/python-modules/i3ipc { };
@ -430,6 +432,8 @@ in {
aiohttp-cors = callPackage ../development/python-modules/aiohttp/cors.nix { };
aiohttp-jinja2 = callPackage ../development/python-modules/aiohttp-jinja2 { };
alabaster = callPackage ../development/python-modules/alabaster {};
alembic = callPackage ../development/python-modules/alembic {};
@ -622,23 +626,10 @@ in {
gui = false;
};
deluge-client = callPackage ../development/python-modules/deluge-client { };
arrow = callPackage ../development/python-modules/arrow { };
async = buildPythonPackage rec {
name = "async-0.6.1";
disabled = isPy3k;
meta.maintainers = with maintainers; [ ];
buildInputs = with self; [ pkgs.zlib ];
doCheck = false;
src = pkgs.fetchurl {
url = "mirror://pypi/a/async/${name}.tar.gz";
sha256 = "1lfmjm8apy9qpnpbq8g641fd01qxh9jlya5g2d6z60vf8p04rla1";
};
};
asynctest = callPackage ../development/python-modules/asynctest { };
async-timeout = callPackage ../development/python-modules/async_timeout { };
@ -2832,6 +2823,8 @@ in {
};
};
miniupnpc = callPackage ../development/python-modules/miniupnpc {};
mixpanel = buildPythonPackage rec {
version = "4.0.2";
name = "mixpanel-${version}";
@ -20922,10 +20915,14 @@ EOF
thinc = callPackage ../development/python-modules/thinc { };
yahooweather = callPackage ../development/python-modules/yahooweather { };
spacy = callPackage ../development/python-modules/spacy { };
spacy_models = callPackage ../development/python-modules/spacy/models.nix { };
sseclient = callPackage ../development/python-modules/sseclient { };
textacy = callPackage ../development/python-modules/textacy { };
pyemd = callPackage ../development/python-modules/pyemd { };