about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Schütz <rschuetz17@gmail.com>2018-06-26 20:22:38 +0200
committerGitHub <noreply@github.com>2018-06-26 20:22:38 +0200
commit352995d79b9fac78c7414a8c880662892ed495cc (patch)
tree43121eb9368b74c7eb14e73e185651750fda0cbe
parent9e02afcd80043f57e193bdc0f31a7745ffd2164f (diff)
parent5db01c52434e55ea95b477a204ee29cb4fb8c53a (diff)
downloadnixlib-352995d79b9fac78c7414a8c880662892ed495cc.tar
nixlib-352995d79b9fac78c7414a8c880662892ed495cc.tar.gz
nixlib-352995d79b9fac78c7414a8c880662892ed495cc.tar.bz2
nixlib-352995d79b9fac78c7414a8c880662892ed495cc.tar.lz
nixlib-352995d79b9fac78c7414a8c880662892ed495cc.tar.xz
nixlib-352995d79b9fac78c7414a8c880662892ed495cc.tar.zst
nixlib-352995d79b9fac78c7414a8c880662892ed495cc.zip
Merge pull request #42052 from makefu/pkgs/python-forecastio/init
pythonPackages.python-forecastio: init at 1.4.0
-rw-r--r--pkgs/development/python-modules/python-forecastio/default.nix31
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix4
-rw-r--r--pkgs/top-level/python-packages.nix2
3 files changed, 35 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/python-forecastio/default.nix b/pkgs/development/python-modules/python-forecastio/default.nix
new file mode 100644
index 000000000000..68f9ad16977b
--- /dev/null
+++ b/pkgs/development/python-modules/python-forecastio/default.nix
@@ -0,0 +1,31 @@
+{ buildPythonPackage, stdenv, fetchPypi
+, requests
+, nose
+, responses
+}:
+
+buildPythonPackage rec {
+  pname = "python-forecastio";
+  version = "1.4.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0m6lf4a46pnwm5xg9dnmwslwzrpnj6d9agw570grciivbvb1ji0l";
+
+  };
+
+  checkInputs = [ nose ];
+
+  propagatedBuildInputs = [ requests responses ];
+
+  checkPhase = ''
+    nosetests
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://zeevgilovitz.com/python-forecast.io/;
+    description = "A thin Python Wrapper for the Dark Sky (formerly forecast.io) weather API";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ makefu ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 7bf7d6237488..331aa2c68014 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -794,7 +794,7 @@
     "sensor.cups" = ps: with ps; [ pycups ];
     "sensor.currencylayer" = ps: with ps; [  ];
     "sensor.daikin" = ps: with ps; [  ];
-    "sensor.darksky" = ps: with ps; [  ];
+    "sensor.darksky" = ps: with ps; [ python-forecastio ];
     "sensor.deconz" = ps: with ps; [  ];
     "sensor.deluge" = ps: with ps; [ deluge-client ];
     "sensor.demo" = ps: with ps; [  ];
@@ -1183,7 +1183,7 @@
     "weather" = ps: with ps; [  ];
     "weather.bom" = ps: with ps; [  ];
     "weather.buienradar" = ps: with ps; [  ];
-    "weather.darksky" = ps: with ps; [  ];
+    "weather.darksky" = ps: with ps; [ python-forecastio ];
     "weather.demo" = ps: with ps; [  ];
     "weather.ecobee" = ps: with ps; [  ];
     "weather.ipma" = ps: with ps; [  ];
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index feb64b1cbbc8..c7033d31d044 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2615,6 +2615,8 @@ in {
     };
   };
 
+  python-forecastio = callPackage ../development/python-modules/python-forecastio { };
+
   fpdf = callPackage ../development/python-modules/fpdf { };
 
   fpylll = callPackage ../development/python-modules/fpylll { };