diff --git a/pkgs/development/python-modules/music-assistant-models/default.nix b/pkgs/development/python-modules/music-assistant-models/default.nix new file mode 100644 index 000000000000..58e4348622b0 --- /dev/null +++ b/pkgs/development/python-modules/music-assistant-models/default.nix @@ -0,0 +1,58 @@ +{ + 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"; + rev = "refs/tags/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; [ ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cf03bf9774c0..de2af5e2b6b2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8503,6 +8503,8 @@ self: super: with self; { muscima = callPackage ../development/python-modules/muscima { }; + music-assistant-models = callPackage ../development/python-modules/music-assistant-models { }; + musicbrainzngs = callPackage ../development/python-modules/musicbrainzngs { }; music-tag = callPackage ../development/python-modules/music-tag { };