Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

home-assistant-custom-components.smartir: replace disutils with packaging #311375

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions pkgs/servers/home-assistant/custom-components/smartir/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{ lib
, buildHomeAssistantComponent
, fetchFromGitHub
, aiofiles
, broadlink
{
lib,
buildHomeAssistantComponent,
fetchFromGitHub,
fetchpatch,
aiofiles,
broadlink,
nix-update-script,
}:

buildHomeAssistantComponent rec {
Expand All @@ -17,6 +20,15 @@ buildHomeAssistantComponent rec {
hash = "sha256-E6TM761cuaeQzlbjA+oZ+wt5HTJAfkF2J3i4P1Wbuic=";
};

patches = [
# Replace distutils.version.StrictVersion with packaging.version.Version
# https://github.com/smartHomeHub/SmartIR/pull/1250
(fetchpatch {
url = "https://github.com/smartHomeHub/SmartIR/commit/1ed8ef23a8f7b9dcae75721eeab8d5f79013b851.patch";
hash = "sha256-IhdnTDtUa7mS+Vw/+BqfqWIKK4hbshbVgJNjfKjgAvI=";
})
];

propagatedBuildInputs = [
aiofiles
broadlink
Expand All @@ -28,6 +40,8 @@ buildHomeAssistantComponent rec {
cp -r codes $out/custom_components/smartir/
'';

passthru.updateScript = nix-update-script { };

meta = with lib; {
changelog = "https://github.com/smartHomeHub/SmartIR/releases/tag/v${version}";
description = "Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)";
Expand Down
Loading