aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/google-music-proto/default.nix
blob: 2645c4efad801f274851726a0a7431ed55f4b383 (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
{ lib, buildPythonPackage, fetchPypi, pythonOlder
, attrs
, audio-metadata
, importlib-metadata
, marshmallow
, pendulum
, protobuf
}:

buildPythonPackage rec {
  pname = "google-music-proto";
  version = "2.8.0";
  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    sha256 = "10qraipdr18pwnr1dz6ai5vxs9lmww5wbavbh1xyg4lsggmlsrqb";
  };

  postPatch = ''
    sed -i -e "/audio-metadata/c\'audio-metadata'," -e "/marshmallow/c\'marshmallow'," setup.py
  '';

  propagatedBuildInputs = [
    attrs
    audio-metadata
    marshmallow
    pendulum
    protobuf
  ] ++ lib.optionals (pythonOlder "3.8") [
    importlib-metadata
  ];

  # No tests
  doCheck = false;
  pythonImportsCheck = [ "google_music_proto" ];

  meta = with lib; {
    homepage = "https://github.com/thebigmunch/google-music-proto";
    description = "Sans-I/O wrapper of Google Music API calls";
    license = licenses.mit;
    maintainers = with maintainers; [ jakewaksbaum ];
  };
}