1{ lib
2, stdenv
3, buildPythonPackage
4, dbus-python
5, fetchFromGitHub
6, flask
7, flask-cors
8, poetry-core
9, pythonOlder
10, requests
11}:
12
13buildPythonPackage rec {
14 pname = "swspotify";
15 version = "1.2.3";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchFromGitHub {
21 owner = "SwagLyrics";
22 repo = "SwSpotify";
23 rev = "v${version}";
24 hash = "sha256-xGLvc154xnje45Akf7H1qqQRUc03gGVt8AhGlkcP3kY=";
25 };
26
27 nativeBuildInputs = [
28 poetry-core
29 ];
30
31 propagatedBuildInputs = [
32 dbus-python
33 flask
34 flask-cors
35 requests
36 ];
37
38 # Tests want to use Dbus
39 doCheck = false;
40
41 pythonImportsCheck = [
42 "SwSpotify"
43 ];
44
45 meta = with lib; {
46 description = "Library to get the currently playing song and artist from Spotify";
47 homepage = "https://github.com/SwagLyrics/SwSpotify";
48 license = licenses.mit;
49 maintainers = with maintainers; [ siraben ];
50 };
51}