about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pyrogram/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyrogram/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pyrogram/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyrogram/default.nix b/nixpkgs/pkgs/development/python-modules/pyrogram/default.nix
new file mode 100644
index 000000000000..6710d3d286e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/pyrogram/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, pyaes
+, pysocks
+, async-lru
+, pytestCheckHook
+, pytest-asyncio
+}:
+
+buildPythonPackage rec {
+  pname = "pyrogram";
+  version = "1.2.0";
+
+  disabled = pythonOlder "3.6";
+
+  src = fetchFromGitHub {
+    owner = "pyrogram";
+    repo = "pyrogram";
+    rev = "v${version}";
+    sha256 = "0clbnhk1icr4vl29693r6r28f5by5n6pjxjqih21g3yd64q55q3q";
+  };
+
+  propagatedBuildInputs = [
+    pyaes
+    pysocks
+    async-lru
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+    pytest-asyncio
+  ];
+
+  pythonImportsCheck = [
+    "pyrogram"
+    "pyrogram.errors"
+    "pyrogram.types"
+  ];
+
+  meta = with lib; {
+    description = "Telegram MTProto API Client Library and Framework for Python";
+    homepage = "https://github.com/pyrogram/pyrogram";
+    license = licenses.lgpl3Plus;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}