2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ffmpeg
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "shaq";
|
|
|
|
version = "0.0.1";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "woodruffw";
|
|
|
|
repo = "shaq";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-RF606Aeskqbx94H5ivd+RJ+Hk0iYsds/PUY8TZqirs4=";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
python3.pkgs.flit-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
pyaudio
|
|
|
|
pydub
|
|
|
|
rich
|
|
|
|
shazamio
|
|
|
|
];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = with python3.pkgs; {
|
2023-10-09 19:29:22 +00:00
|
|
|
dev = [
|
|
|
|
build
|
|
|
|
shaq
|
|
|
|
];
|
|
|
|
lint = [
|
|
|
|
black
|
|
|
|
mypy
|
|
|
|
ruff
|
|
|
|
];
|
|
|
|
test = [
|
|
|
|
pretend
|
|
|
|
pytest
|
|
|
|
pytest-cov
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "shaq" ];
|
|
|
|
|
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix"
|
|
|
|
"PATH"
|
|
|
|
":"
|
|
|
|
(lib.makeBinPath [ ffmpeg ])
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "CLI client for Shazam";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/woodruffw/shaq";
|
|
|
|
changelog = "https://github.com/woodruffw/shaq/releases/tag/${src.rev}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda mig4ng ];
|
|
|
|
mainProgram = "shaq";
|
|
|
|
};
|
|
|
|
}
|