summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-01-02 05:14:26 +0100
committerGitHub <noreply@github.com>2021-01-02 05:14:26 +0100
commitda613094f76df071b255d456eb6a124edeba2ce9 (patch)
tree5297677eb77dc1d53b72504bfe1b7ff668889182
parent0d0c68e43b80cc09f35b612380277856f9cde90b (diff)
parentfff0b0c840a2b30e4e74d24c7550fb14d1499f7d (diff)
downloadnixpkgs-da613094f76df071b255d456eb6a124edeba2ce9.tar
nixpkgs-da613094f76df071b255d456eb6a124edeba2ce9.tar.gz
nixpkgs-da613094f76df071b255d456eb6a124edeba2ce9.tar.bz2
nixpkgs-da613094f76df071b255d456eb6a124edeba2ce9.tar.lz
nixpkgs-da613094f76df071b255d456eb6a124edeba2ce9.tar.xz
nixpkgs-da613094f76df071b255d456eb6a124edeba2ce9.tar.zst
nixpkgs-da613094f76df071b255d456eb6a124edeba2ce9.zip
Merge pull request #108175 from fabaff/python-opendata-transport
python3Packages.python-opendata-transport: init at 0.2.1
-rw-r--r--pkgs/development/python-modules/python-opendata-transport/default.nix36
-rw-r--r--pkgs/servers/home-assistant/component-packages.nix2
-rw-r--r--pkgs/top-level/python-packages.nix2
3 files changed, 39 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/python-opendata-transport/default.nix b/pkgs/development/python-modules/python-opendata-transport/default.nix
new file mode 100644
index 00000000000..634ccea371e
--- /dev/null
+++ b/pkgs/development/python-modules/python-opendata-transport/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, aiohttp
+, async-timeout
+, urllib3
+}:
+
+buildPythonPackage rec {
+  pname = "python-opendata-transport";
+  version = "0.2.1";
+
+  src = fetchPypi {
+    pname = "python_opendata_transport";
+    inherit version;
+    sha256 = "0pxs9zqk00vn1s74cx1416mqmixrr74wb0jb0j6b1c3xpvzlfbks";
+  };
+
+  propagatedBuildInputs = [
+    aiohttp
+    async-timeout
+    urllib3
+  ];
+
+  # no tests are present
+  doCheck = false;
+
+  pythonImportsCheck = [ "opendata_transport" ];
+
+  meta = with lib; {
+    description = "Python client for interacting with transport.opendata.ch";
+    homepage = "https://github.com/home-assistant-ecosystem/python-opendata-transport";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix
index 8f35ffe5c16..d26b1dedd88 100644
--- a/pkgs/servers/home-assistant/component-packages.nix
+++ b/pkgs/servers/home-assistant/component-packages.nix
@@ -796,7 +796,7 @@
     "supla" = ps: with ps; [ ]; # missing inputs: asyncpysupla
     "surepetcare" = ps: with ps; [ ]; # missing inputs: surepy
     "swiss_hydrological_data" = ps: with ps; [ ]; # missing inputs: swisshydrodata
-    "swiss_public_transport" = ps: with ps; [ ]; # missing inputs: python_opendata_transport
+    "swiss_public_transport" = ps: with ps; [ python-opendata-transport ];
     "swisscom" = ps: with ps; [ ];
     "switch" = ps: with ps; [ ];
     "switchbot" = ps: with ps; [ ]; # missing inputs: PySwitchbot
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 638fe9612da..a53b50146fe 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -6056,6 +6056,8 @@ in {
 
   python-olm = callPackage ../development/python-modules/python-olm { };
 
+  python-opendata-transport = callPackage ../development/python-modules/python-opendata-transport { };
+
   python_openzwave = callPackage ../development/python-modules/python_openzwave { inherit (pkgs) pkgconfig; };
 
   python-otr = callPackage ../development/python-modules/python-otr { };