home-assistant-custom-components.meshcore_ha: init at 2.1.3 (#440915)

This commit is contained in:
Martin Weinelt
2026-06-04 01:41:02 +00:00
committed by GitHub
8 changed files with 178 additions and 9 deletions
+1
View File
@@ -0,0 +1 @@
{ python3Packages }: with python3Packages; toPythonApplication meshcore-cli
@@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
hatchling,
# dependencies
bleak,
meshcore,
prompt-toolkit,
requests,
}:
buildPythonPackage (finalAttrs: {
pname = "meshcore-cli";
version = "1.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "fdlamotte";
repo = "meshcore-cli";
tag = "v${finalAttrs.version}";
hash = "sha256-wby97e9Xulk2pwNJ9mnvKxWlTsWmH4n3zlTtYi7WS6I=";
};
build-system = [ hatchling ];
dependencies = [
meshcore
bleak
prompt-toolkit
requests
];
pythonImportsCheck = [
"meshcore_cli"
];
doCheck = false; # no tests
__structuredAttrs = true;
meta = {
changelog = "https://github.com/meshcore-dev/meshcore-cli/releases/tag/${finalAttrs.src.tag}";
description = "Command line interface to MeshCore node";
homepage = "https://github.com/fdlamotte/meshcore-cli";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.haylin ];
mainProgram = "meshcore-cli";
};
})
@@ -2,31 +2,54 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
# build-system
hatchling,
# dependencies
bleak,
pycayennelpp,
pyserial-asyncio-fast,
pycryptodome,
# tests
pytest-asyncio,
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "meshcore";
version = "2.2.8";
version = "2.3.0";
pyproject = true;
src = fetchFromGitHub {
owner = "meshcore-dev";
repo = "meshcore_py";
tag = "v${finalAttrs.version}";
hash = "sha256-S3hyA2TsgEHwB0gv5xFMTbwnAoGbceq0C5+8MBedD70=";
hash = "sha256-Vz2LQaP44Yojf9h2rSBvKRjW99IOj7C5MxqQnIUoIRE=";
};
patches = [
(fetchpatch {
# https://github.com/meshcore-dev/meshcore_py/pull/71
url = "https://github.com/meshcore-dev/meshcore_py/commit/9294e574739844e0e291b972b40e1a0a40149e47.patch";
hash = "sha256-Ufr+5rDDO32W6dtD7wEU34iLJai3H0dBCEtLS5j4u/0=";
})
];
build-system = [ hatchling ];
dependencies = [
bleak
pycayennelpp
pyserial-asyncio-fast
pycryptodome
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "meshcore" ];
@@ -52,13 +52,10 @@ lib.extendMkDerivation {
runHook postInstall
'';
nativeBuildInputs =
with home-assistant.python3Packages;
[
manifestRequirementsCheckHook
packaging
]
++ (args.nativeBuildInputs or [ ]);
nativeBuildInputs = [
manifestRequirementsCheckHook
]
++ (args.nativeBuildInputs or [ ]);
passthru = {
isHomeAssistantComponent = true;
@@ -6,6 +6,7 @@
makeSetupHook {
name = "manifest-check-hook";
propagatedNativeBuildInputs = [ python3Packages.packaging ];
substitutions = {
pythonCheckInterpreter = python3Packages.python.interpreter;
checkManifest = ./check_manifest.py;
@@ -0,0 +1,50 @@
{
lib,
fetchFromGitHub,
buildHomeAssistantComponent,
cachetools,
meshcore,
meshcore-cli,
paho-mqtt,
pynacl,
pytest-asyncio,
pytestCheckHook,
}:
buildHomeAssistantComponent (finalAttrs: {
owner = "meshcore-dev";
domain = "meshcore";
version = "2.7.0";
src = fetchFromGitHub {
owner = "meshcore-dev";
repo = "meshcore-ha";
tag = "v${finalAttrs.version}";
hash = "sha256-DykWjoMVVKzDa05UtytrkwUej80zteZThi8E3e7M+ZU=";
};
dependencies = [
cachetools
meshcore
meshcore-cli
paho-mqtt
pynacl
];
ignoreVersionRequirement = [
"meshcore"
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
meta = {
changelog = "https://github.com/meshcore-dev/meshcore-ha/releases/tag/${finalAttrs.src.tag}";
description = "Home Assistant integration for MeshCore";
homepage = "https://github.com/meshcore-dev/meshcore-ha/";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.haylin ];
};
})
@@ -0,0 +1,42 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
nix-update-script,
}:
buildNpmPackage (finalAttrs: {
pname = "meshcore-card";
version = "0.3.5";
strictDeps = true;
src = fetchFromGitHub {
owner = "jpettitt";
repo = "meshcore-card";
tag = "v${finalAttrs.version}";
hash = "sha256-XfqtCGSDrfkNIqWuH8Y8DLacJf9x7iaZXDiKDWdqzhw=";
};
npmDepsHash = "sha256-KgG6PGSGw9zCOPboZjo/gpAs2OwLg3LRl3rqenIvTG8=";
installPhase = ''
runHook preInstall
mkdir $out
cp dist/${finalAttrs.pname}.js $out/
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
__structuredAttrs = true;
meta = {
description = "MeshCore Lovelace card for Home Assistant";
homepage = "https://github.com/jpettitt/meshcore-card";
changelog = "https://github.com/jpettitt/meshcore-card/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ hexa ];
};
})
+2
View File
@@ -9898,6 +9898,8 @@ self: super: with self; {
meshcore = callPackage ../development/python-modules/meshcore { };
meshcore-cli = callPackage ../development/python-modules/meshcore-cli { };
meshio = callPackage ../development/python-modules/meshio { };
meshlabxml = callPackage ../development/python-modules/meshlabxml { };