buildHomeAssistantComponent: run manifestRequirementsCheckHook independently of checkPhase (#467204)

This commit is contained in:
Martin Weinelt
2025-12-02 21:54:57 +00:00
committed by GitHub
6 changed files with 18 additions and 44 deletions
@@ -18,9 +18,14 @@ buildPythonPackage rec {
owner = "pymitsubishi";
repo = "pymitsubishi";
tag = "v${version}";
hash = "sha256-QjHMIzl2VV1S8tNWsFLgLDNX6/0wN9FeIJIo5KgkDVE=";
hash = "sha256-frqyAXAP2O8TZzXx5ephcLSLJA9p0P74KJrPoSKPYYo=";
};
postPatch = ''
# make sure pyproject.toml specifies the correct version
grep -qF 'version = "${version}"' pyproject.toml
'';
build-system = [ setuptools ];
dependencies = [
@@ -68,7 +68,7 @@ def main(args):
# At least one manifest should match the component name
ok &= any(check_derivation_name(manifest) for manifest in manifests)
# All requirements need to match, use `ignoreRequirementVersion` to ignore too strict version constraints
# All requirements need to match, use `ignoreVersionRequirement` to ignore too strict version constraints
ok &= all(
check_requirements(manifest, args.ignore_version_requirement)
for manifest in manifests
@@ -41,13 +41,13 @@ home-assistant.python.pkgs.buildPythonPackage (
runHook postInstall
'';
nativeCheckInputs =
nativeBuildInputs =
with home-assistant.python.pkgs;
[
manifestRequirementsCheckHook
packaging
]
++ (args.nativeCheckInputs or [ ]);
++ (args.nativeBuildInputs or [ ]);
passthru = {
isHomeAssistantComponent = true;
@@ -11,13 +11,13 @@
buildHomeAssistantComponent rec {
owner = "pymitsubishi";
domain = "mitsubishi";
version = "0.4.0";
version = "0.4.2";
src = fetchFromGitHub {
owner = "pymitsubishi";
repo = "homeassistant-mitsubishi";
tag = "v${version}";
hash = "sha256-VEV+HOzXrxX2rsStjwXD4ZWclP2oF6zZHv0MuzL8DE4=";
hash = "sha256-c1KnFpRK5dH7ZGsDuJD6Awa0xhxYYZxC4zCjoRdpOns=";
};
dependencies = [
@@ -8,12 +8,12 @@
buildHomeAssistantComponent rec {
owner = "weltenwort";
domain = "rct_power";
version = "v0.14.1";
version = "0.14.1";
src = fetchFromGitHub {
owner = "weltenwort";
repo = "home-assistant-rct-power-integration";
tag = version;
tag = "v${version}";
hash = "sha256-wM66MyRhBsMfUr+KlqV4jSuXcnKfW0fkbDAyuU2crsc=";
};
@@ -21,6 +21,11 @@ buildHomeAssistantComponent rec {
rctclient
];
ignoreVersionRequirement = [
# rctclient 0.0.4 was never published on PyPI
"rctclient"
];
doCheck = false; # no tests
meta = with lib; {
@@ -1,36 +0,0 @@
{
ascii-magic,
buildHomeAssistantComponent,
fetchFromGitHub,
lib,
weconnect,
}:
buildHomeAssistantComponent rec {
owner = "mitch-dc";
domain = "volkswagen_we-connect_id";
version = "0.2.6";
src = fetchFromGitHub {
inherit owner;
repo = "volkswagen_we_connect_id";
tag = "v${version}";
hash = "sha256-f5guxLE93QtTPV1zw1313bzF521pVr0vsUa3hzcRmJo=";
};
dependencies = [
ascii-magic
weconnect
];
# upstream has no tests
doCheck = false;
meta = {
changelog = "https://github.com/mitch-dc/volkswagen_we_connect_id/releases/tag/v${version}";
description = "Statistics from the Volkswagen ID API";
homepage = "https://github.com/mitch-dc/volkswagen_we_connect_id";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ dotlambda ];
};
}