Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / shazamio / default.nix
blobe96776e60b8a1f4bfa80d19a13800739cf50db91
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , fetchpatch
5 , poetry-core
6 , wheel
7 , aiofiles
8 , aiohttp
9 , dataclass-factory
10 , numpy
11 , pydantic
12 , pydub
13 , ffmpeg
14 , pytest-asyncio
15 , pytestCheckHook
18 buildPythonPackage rec {
19   pname = "shazamio";
20   version = "0.5.1";
21   format = "pyproject";
23   src = fetchFromGitHub {
24     owner = "dotX12";
25     repo = "ShazamIO";
26     rev = "refs/tags/${version}";
27     hash = "sha256-nzKvEoh1DrZegoRNqOCh9Qm+7B7uQ9dEH75mVueGxZI=";
28   };
30   patches = [
31     # remove poetry and virtualenv from build dependencies as they are not used
32     # https://github.com/dotX12/ShazamIO/pull/71
33     (fetchpatch {
34       name = "remove-unused-build-dependencies.patch";
35       url = "https://github.com/dotX12/ShazamIO/commit/5c61e1efe51c2826852da5b6aa6ad8ce3d4012a9.patch";
36       hash = "sha256-KiU5RVBPnSs5qrReFeTe9ePg1fR7y0NchIIHcQwlPaI=";
37     })
38   ];
40   nativeBuildInputs = [
41     poetry-core
42     wheel
43   ];
45   propagatedBuildInputs = [
46     aiofiles
47     aiohttp
48     dataclass-factory
49     numpy
50     pydantic
51     pydub
52   ];
54   nativeCheckInputs = [
55     ffmpeg
56     pytest-asyncio
57     pytestCheckHook
58   ];
60   disabledTests = [
61     # requires internet access
62     "test_about_artist"
63     "test_recognize_song_file"
64     "test_recognize_song_bytes"
65   ];
67   pythonImportsCheck = [ "shazamio" ];
69   meta = with lib; {
70     description = "A free asynchronous library from reverse engineered Shazam API";
71     homepage = "https://github.com/dotX12/ShazamIO";
72     changelog = "https://github.com/dotX12/ShazamIO/releases/tag/${src.rev}";
73     license = licenses.mit;
74     maintainers = with maintainers; [ figsoda ];
75     # https://github.com/shazamio/ShazamIO/issues/80
76     broken = versionAtLeast pydantic.version "2";
77   };