python3Packages.music-assistant-models: convert to finalAttrs, test music-assistant in passthru.tests

This commit is contained in:
Sandro Jäckel
2026-04-08 17:33:21 +02:00
parent 442da807a1
commit 67ccbd4dc7
2 changed files with 10 additions and 17 deletions
+2 -10
View File
@@ -14,20 +14,12 @@ let
packageOverrides = self: super: {
music-assistant-frontend = self.callPackage ./frontend.nix { };
music-assistant-models = super.music-assistant-models.overridePythonAttrs (oldAttrs: rec {
music-assistant-models = super.music-assistant-models.overridePythonAttrs (oldAttrs: {
version = "1.1.86";
src = fetchFromGitHub {
owner = "music-assistant";
repo = "models";
tag = version;
src = oldAttrs.src.override {
hash = "sha256-dQwFsuelp/3s2CO/5jxNrZcmWxE9xYhrpx0O37Tq/TQ=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "0.0.0" "${version}"
'';
});
};
};
@@ -15,10 +15,11 @@
pytest-cov-stub,
# reverse dependencies
music-assistant,
music-assistant-client,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "music-assistant-models";
# Must be compatible with music-assistant-client package
# nixpkgs-update: no auto update
@@ -28,13 +29,13 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "music-assistant";
repo = "models";
tag = version;
tag = finalAttrs.version;
hash = "sha256-/eNCgAB5G8g1r2fcW27lySEqg+q/1bJvwwyntigGWjo=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "0.0.0" "${version}"
--replace-fail "0.0.0" "${finalAttrs.version}"
'';
build-system = [ setuptools ];
@@ -54,14 +55,14 @@ buildPythonPackage rec {
];
passthru.tests = {
inherit music-assistant-client;
inherit music-assistant music-assistant-client;
};
meta = {
description = "Models used by Music Assistant (shared by client and server";
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/releases/tag/${src.tag}";
changelog = "https://github.com/music-assistant/models/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = [ ];
};
}
})