1{
2 lib,
3 attrs,
4 bidict,
5 bitstruct,
6 buildPythonPackage,
7 fetchFromGitHub,
8 fetchpatch,
9 more-itertools,
10 poetry-core,
11 pprintpp,
12 pythonOlder,
13 tbm-utils,
14}:
15
16buildPythonPackage rec {
17 pname = "audio-metadata";
18 version = "0.11.1";
19 pyproject = true;
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "thebigmunch";
25 repo = "audio-metadata";
26 tag = version;
27 hash = "sha256-5ZX4HwbuB9ZmFfHuxaMCrn3R7/znuDsoyqqLql2Nizg=";
28 };
29
30 patches = [
31 # Switch to poetry-core, https://github.com/thebigmunch/audio-metadata/pull/41
32 (fetchpatch {
33 name = "switch-to-poetry-core.patch";
34 url = "https://github.com/thebigmunch/audio-metadata/commit/dfe91a69ee37e9dcefb692165eb0f9cd36a7e5b8.patch";
35 hash = "sha256-ut3mqgZQu0YFbsTEA13Ch0+aSNl17ndMV0fuIu3n5tc=";
36 })
37 ];
38
39 pythonRelaxDeps = [
40 "attrs"
41 "more-itertools"
42 ];
43
44 build-system = [ poetry-core ];
45
46 dependencies = [
47 attrs
48 bidict
49 bitstruct
50 more-itertools
51 pprintpp
52 tbm-utils
53 ];
54
55 # Tests require ward which is not ready to be used
56 doCheck = false;
57
58 pythonImportsCheck = [ "audio_metadata" ];
59
60 meta = with lib; {
61 description = "Library for handling the metadata from audio files";
62 homepage = "https://github.com/thebigmunch/audio-metadata";
63 changelog = "https://github.com/thebigmunch/audio-metadata/blob/${version}/CHANGELOG.md";
64 license = licenses.mit;
65 maintainers = with maintainers; [ jakewaksbaum ];
66 };
67}