about summary refs log tree commit diff
path: root/pkgs/development/python-modules/audio-metadata/default.nix
blob: e9be3715ec311a30f12793f7395ec9f6de6ea4d1 (plain) (blame)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
  lib,
  attrs,
  bidict,
  bitstruct,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  more-itertools,
  poetry-core,
  pprintpp,
  pythonOlder,
  pythonRelaxDepsHook,
  tbm-utils,
}:

buildPythonPackage rec {
  pname = "audio-metadata";
  version = "0.11.1";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "thebigmunch";
    repo = "audio-metadata";
    rev = "refs/tags/${version}";
    hash = "sha256-5ZX4HwbuB9ZmFfHuxaMCrn3R7/znuDsoyqqLql2Nizg=";
  };

  patches = [
    # Switch to poetry-core, https://github.com/thebigmunch/audio-metadata/pull/41
    (fetchpatch {
      name = "switch-to-poetry-core.patch";
      url = "https://github.com/thebigmunch/audio-metadata/commit/dfe91a69ee37e9dcefb692165eb0f9cd36a7e5b8.patch";
      hash = "sha256-ut3mqgZQu0YFbsTEA13Ch0+aSNl17ndMV0fuIu3n5tc=";
    })
  ];

  pythonRelaxDeps = [
    "attrs"
    "more-itertools"
  ];

  build-system = [ poetry-core ];

  nativeBuildInputs = [ pythonRelaxDepsHook ];

  dependencies = [
    attrs
    bidict
    bitstruct
    more-itertools
    pprintpp
    tbm-utils
  ];

  # Tests require ward which is not ready to be used
  doCheck = false;

  pythonImportsCheck = [ "audio_metadata" ];

  meta = with lib; {
    description = "Library for handling the metadata from audio files";
    homepage = "https://github.com/thebigmunch/audio-metadata";
    changelog = "https://github.com/thebigmunch/audio-metadata/blob/${version}/CHANGELOG.md";
    license = licenses.mit;
    maintainers = with maintainers; [ jakewaksbaum ];
  };
}