summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/swspotify/default.nix
blob: 60fc2057effe856317bdf773aa81a310e170f816 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  lib,
  buildPythonPackage,
  dbus-python,
  fetchFromGitHub,
  flask,
  flask-cors,
  poetry-core,
  requests,
}:

buildPythonPackage rec {
  pname = "swspotify";
  version = "1.2.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "SwagLyrics";
    repo = "SwSpotify";
    rev = "v${version}";
    hash = "sha256-xGLvc154xnje45Akf7H1qqQRUc03gGVt8AhGlkcP3kY=";
  };

  build-system = [ poetry-core ];

  dependencies = [
    dbus-python
    flask
    flask-cors
    requests
  ];

  pythonRelaxDeps = [
    "flask-cors"
    "flask"
  ];

  # Tests want to use Dbus
  doCheck = false;

  pythonImportsCheck = [ "SwSpotify" ];

  meta = {
    description = "Library to get the currently playing song and artist from Spotify";
    homepage = "https://github.com/SwagLyrics/SwSpotify";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ siraben ];
  };
}