Files
nixpkgs/pkgs/development/python-modules/music-assistant-models/default.nix
T
2025-01-04 00:19:17 +01:00

59 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
# dependencies
mashumaro,
orjson,
# tests
pytestCheckHook,
pytest-cov-stub,
}:
buildPythonPackage rec {
pname = "music-assistant-models";
version = "1.1.3";
pyproject = true;
src = fetchFromGitHub {
owner = "music-assistant";
repo = "models";
tag = "v${version}";
hash = "sha256-FbnwUfAwCwwBKqEUtb2ZBxHehFwJdr9YkuWKox018BY=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "0.0.0" "${version}"
'';
build-system = [ setuptools ];
dependencies = [
mashumaro
orjson
];
nativeCheckInputs = [
pytest-cov-stub
pytestCheckHook
];
pythonImportsCheck = [
"music_assistant_models"
];
meta = {
description = "Models used by Music Assistant (shared by client and server";
homepage = "https://github.com/music-assistant/models";
changelog = "https://github.com/music-assistant/models/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ ];
};
}