python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / shazamio / default.nix
bloba23ddc53b33e25c97cbe97b8111df68ab4ba22e2
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch,
6   poetry-core,
7   wheel,
8   aiofiles,
9   aiohttp,
10   dataclass-factory,
11   numpy,
12   pydantic,
13   pydub,
14   ffmpeg,
15   pytest-asyncio,
16   pytestCheckHook,
19 buildPythonPackage rec {
20   pname = "shazamio";
21   version = "0.6.0";
22   format = "pyproject";
24   src = fetchFromGitHub {
25     owner = "dotX12";
26     repo = "ShazamIO";
27     rev = "refs/tags/${version}";
28     hash = "sha256-PYA7HUm++4r4kwezyPi3mWRRGF47qHjz2nHUZmVYk/I=";
29   };
31   patches = [
32     # remove poetry and virtualenv from build dependencies as they are not used
33     # https://github.com/dotX12/ShazamIO/pull/71
34     (fetchpatch {
35       name = "remove-unused-build-dependencies.patch";
36       url = "https://github.com/dotX12/ShazamIO/commit/5c61e1efe51c2826852da5b6aa6ad8ce3d4012a9.patch";
37       hash = "sha256-KiU5RVBPnSs5qrReFeTe9ePg1fR7y0NchIIHcQwlPaI=";
38     })
39   ];
41   nativeBuildInputs = [
42     poetry-core
43     wheel
44   ];
46   propagatedBuildInputs = [
47     aiofiles
48     aiohttp
49     dataclass-factory
50     numpy
51     pydantic
52     pydub
53   ];
55   nativeCheckInputs = [
56     ffmpeg
57     pytest-asyncio
58     pytestCheckHook
59   ];
61   disabledTests = [
62     # requires internet access
63     "test_about_artist"
64     "test_recognize_song_file"
65     "test_recognize_song_bytes"
66   ];
68   pythonImportsCheck = [ "shazamio" ];
70   meta = with lib; {
71     description = "Free asynchronous library from reverse engineered Shazam API";
72     homepage = "https://github.com/dotX12/ShazamIO";
73     changelog = "https://github.com/dotX12/ShazamIO/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
74     license = licenses.mit;
75     maintainers = with maintainers; [ figsoda ];
76     # https://github.com/shazamio/ShazamIO/issues/80
77     broken = versionAtLeast pydantic.version "2";
78   };