about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pynws/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pynws/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pynws/default.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pynws/default.nix b/nixpkgs/pkgs/development/python-modules/pynws/default.nix
new file mode 100644
index 000000000000..abe4c93b818f
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/pynws/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, aiohttp
+, buildPythonPackage
+, fetchFromGitHub
+, freezegun
+, metar
+, pytest-aiohttp
+, pytest-asyncio
+, pytest-cov
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "pynws";
+  version = "1.3.0";
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "MatthewFlamm";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "13ipmx60kicwh8qxjazap4vk94x8i3r0lnkdsap7gffaizwgp49d";
+  };
+
+  propagatedBuildInputs = [
+    aiohttp
+    metar
+  ];
+
+  checkInputs = [
+    freezegun
+    pytest-aiohttp
+    pytest-asyncio
+    pytest-cov
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [ "pynws" ];
+
+  meta = with lib; {
+    description = "Python library to retrieve data from NWS/NOAA";
+    homepage = "https://github.com/MatthewFlamm/pynws";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}