about summary refs log tree commit diff
path: root/pkgs/development/python-modules/elevenlabs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/elevenlabs/default.nix')
-rw-r--r--pkgs/development/python-modules/elevenlabs/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/elevenlabs/default.nix b/pkgs/development/python-modules/elevenlabs/default.nix
new file mode 100644
index 000000000000..cd29238f4bbd
--- /dev/null
+++ b/pkgs/development/python-modules/elevenlabs/default.nix
@@ -0,0 +1,49 @@
+{
+  buildPythonPackage,
+  fetchFromGitHub,
+  httpx,
+  lib,
+  poetry-core,
+  pydantic,
+  pydantic-core,
+  requests,
+  typing-extensions,
+  websockets,
+}:
+
+buildPythonPackage rec {
+  pname = "elevenlabs";
+  version = "1.9.0";
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner = "elevenlabs";
+    repo = "elevenlabs-python";
+    rev = "refs/tags/${version}";
+    hash = "sha256-0fkt2Z05l95b2S+xoyyy9VGAUZDI1SM8kdcP1PCrUg8=";
+  };
+
+  build-system = [ poetry-core ];
+
+  dependencies = [
+    httpx
+    pydantic
+    pydantic-core
+    requests
+    typing-extensions
+    websockets
+  ];
+
+  pythonImportsCheck = [ "elevenlabs" ];
+
+  # tests access the API on the internet
+  doCheck = false;
+
+  meta = {
+    changelog = "https://github.com/elevenlabs/elevenlabs-python/releases/tag/v${version}";
+    description = "Official Python API for ElevenLabs Text to Speech";
+    homepage = "https://github.com/elevenlabs/elevenlabs-python";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ dotlambda ];
+  };
+}