git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #120550 from fabaff/smhi
commit0ca4f6b7395ffcfd0153791f9623a4844650b023 authorMartin Weinelt <mweinelt@users.noreply.github.com> dateSat 24 Apr 2021, 20:22 (6 years ago) parent1c62c0fe1054f0
4 files changed+51−1
pkgs/development/python-modules/smhi-pkg/default.nix+47 pkgs/servers/home-assistant/component-packages.nix+1−1 pkgs/servers/home-assistant/default.nix+1 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/smhi-pkg/default.nixnew file+47
@@ -0,0 +1,47 @@
1+{ lib
2+, aiohttp
3+, buildPythonPackage
4+, fetchFromGitHub
5+, pytest-asyncio
6+, pytestCheckHook
7+}:
8+
9+buildPythonPackage rec {
10+ pname = "smhi-pkg";
11+ version = "1.0.14";
12+
13+ src = fetchFromGitHub {
14+ owner = "joysoftware";
15+ repo = "pypi_smhi";
16+ rev = version;
17+ sha256 = "186xwrg3hvr0hszq2kxvygd241q2sp11gfk6mwj9z4zqywwfcbn3";
18+ };
19+
20+ propagatedBuildInputs = [
21+ aiohttp
22+ ];
23+
24+ checkInputs = [
25+ pytest-asyncio
26+ pytestCheckHook
27+ ];
28+
29+ disabledTests = [
30+ # Disable tests that needs network access
31+ "test_smhi_integration_test"
32+ "test_smhi_async_integration_test"
33+ "test_smhi_async_integration_test_use_session"
34+ "test_smhi_async_get_forecast_integration2"
35+ "test_async_error_from_api"
36+ ];
37+
38+ pythonImportsCheck = [ "smhi" ];
39+
40+ meta = with lib; {
41+ description = "Python library for accessing SMHI open forecast data";
42+ homepage = "https://github.com/joysoftware/pypi_smhi";
43+ changelog = "https://github.com/joysoftware/pypi_smhi/releases/tag/${version}";
44+ license = with licenses; [ mit ];
45+ maintainers = with maintainers; [ fab ];
46+ };
47+}
pkgs/servers/home-assistant/component-packages.nix+1−1
@@ -760,7 +760,7 @@
760760 "smartthings" = ps: with ps; [ aiohttp-cors hass-nabucasa ]; # missing inputs: pysmartapp pysmartthings
761761 "smarttub" = ps: with ps; [ python-smarttub ];
762762 "smarty" = ps: with ps; [ ]; # missing inputs: pysmarty
763− "smhi" = ps: with ps; [ ]; # missing inputs: smhi-pkg
763+ "smhi" = ps: with ps; [ smhi-pkg ];
764764 "sms" = ps: with ps; [ python-gammu ];
765765 "smtp" = ps: with ps; [ ];
766766 "snapcast" = ps: with ps; [ snapcast ];
pkgs/servers/home-assistant/default.nix+1
@@ -357,6 +357,7 @@ in with py.pkgs; buildPythonApplication rec {
357357 "simulated"
358358 "sleepiq"
359359 "sma"
360+ "smhi"
360361 "sensor"
361362 "slack"
362363 "smarttub"
pkgs/top-level/python-packages.nix+2
@@ -8003,6 +8003,8 @@ in {
80038003
80048004 smdebug-rulesconfig = callPackage ../development/python-modules/smdebug-rulesconfig { };
80058005
8006+ smhi-pkg = callPackage ../development/python-modules/smhi-pkg { };
8007+
80068008 smmap2 = throw "smmap2 has been deprecated, use smmap instead."; # added 2020-03-14
80078009
80088010 smmap = callPackage ../development/python-modules/smmap { };