lol
1{ lib
2, python3
3, fetchFromGitHub
4, ffmpeg
5}:
6
7python3.pkgs.buildPythonApplication rec {
8 pname = "shaq";
9 version = "0.0.1";
10 format = "pyproject";
11
12 src = fetchFromGitHub {
13 owner = "woodruffw";
14 repo = "shaq";
15 rev = "v${version}";
16 hash = "sha256-RF606Aeskqbx94H5ivd+RJ+Hk0iYsds/PUY8TZqirs4=";
17 };
18
19 nativeBuildInputs = [
20 python3.pkgs.flit-core
21 ];
22
23 propagatedBuildInputs = with python3.pkgs; [
24 pyaudio
25 pydub
26 rich
27 shazamio
28 ];
29
30 passthru.optional-dependencies = with python3.pkgs; {
31 dev = [
32 build
33 shaq
34 ];
35 lint = [
36 black
37 mypy
38 ruff
39 ];
40 test = [
41 pretend
42 pytest
43 pytest-cov
44 ];
45 };
46
47 pythonImportsCheck = [ "shaq" ];
48
49 makeWrapperArgs = [
50 "--prefix"
51 "PATH"
52 ":"
53 (lib.makeBinPath [ ffmpeg ])
54 ];
55
56 meta = with lib; {
57 description = "A CLI client for Shazam";
58 homepage = "https://github.com/woodruffw/shaq";
59 changelog = "https://github.com/woodruffw/shaq/releases/tag/${src.rev}";
60 license = licenses.mit;
61 maintainers = with maintainers; [ figsoda mig4ng ];
62 mainProgram = "shaq";
63 };
64}