about summary refs log tree commit diff
path: root/pkgs/development/python-modules/librespot/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/librespot/default.nix')
-rw-r--r--pkgs/development/python-modules/librespot/default.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/librespot/default.nix b/pkgs/development/python-modules/librespot/default.nix
new file mode 100644
index 0000000000000..21a25729fa4bf
--- /dev/null
+++ b/pkgs/development/python-modules/librespot/default.nix
@@ -0,0 +1,61 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, defusedxml
+, protobuf
+, pythonRelaxDepsHook
+, websocket-client
+, pyogg
+, zeroconf
+, requests
+, pycryptodomex
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+  pname = "librespot";
+  version = "0.0.9";
+  format = "setuptools";
+
+  src = fetchFromGitHub {
+    owner = "kokarare1212";
+    repo = "librespot-python";
+    rev = "v${version}";
+    hash = "sha256-k9qVsxjRlUZ7vCBx00quiAR7S+YkfyoZiAKVnOOG4xM=";
+  };
+
+  nativeBuildInputs = [
+    pythonRelaxDepsHook
+  ];
+
+  propagatedBuildInputs = [
+    defusedxml
+    protobuf
+    pycryptodomex
+    pyogg
+    requests
+    websocket-client
+    zeroconf
+  ];
+
+  pythonRelaxDeps = [
+    "protobuf"
+    "pyogg"
+    "requests"
+    "zeroconf"
+  ];
+
+  # Doesn't include any tests
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "librespot"
+  ];
+
+  meta = with lib; {
+    description = "Open Source Spotify Client";
+    homepage = "https://github.com/kokarare1212/librespot-python";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ onny ];
+  };
+}