about summary refs log tree commit diff
path: root/pkgs/development/python-modules/telegraph/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/telegraph/default.nix')
-rw-r--r--pkgs/development/python-modules/telegraph/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/telegraph/default.nix b/pkgs/development/python-modules/telegraph/default.nix
new file mode 100644
index 000000000000..a27db889c887
--- /dev/null
+++ b/pkgs/development/python-modules/telegraph/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pythonOlder
+, requests
+, httpx
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "telegraph";
+  version = "2.1.0";
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    repo = "telegraph";
+    owner = "python273";
+    sha256 = "ChlQJu4kHkXUf4gOtW5HS+ThP3eQL7LsyANeS/10pLo=";
+    rev = "da629de7c00c3b8b0c7ab8ef4bf23caf419a3c6c";
+  };
+
+  checkInputs = [ pytestCheckHook ];
+
+  pytestFlagsArray = [ "tests/" ];
+
+  disabledTests = [
+    "test_get_page"
+  ];
+
+  doCheck = true;
+
+  propagatedBuildInputs = [
+    requests
+  ];
+
+  passthru.optional-dependencies = {
+    aio = [
+      httpx
+    ];
+  };
+
+
+  pythonImportsCheck = [ "telegraph" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/python273/telegraph";
+    description = "Telegraph API wrapper";
+    license = licenses.mit;
+    maintainers = with maintainers; [ gp2112 ];
+  };
+}
+