From ae832b573b12a2e0281fa8b8664eefa6a88e0d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 10 Oct 2025 10:25:31 -0700 Subject: [PATCH 1/3] zap-chip: 2025.02.26 -> 2025.07.24 Diff: https://github.com/project-chip/zap/compare/v2025.02.26...v2025.07.24 Changelog: https://github.com/project-chip/zap/releases/tag/v2025.07.24 --- ...dont-download-copyfiles-to-copy-files.patch | 18 +++++++++--------- pkgs/by-name/za/zap-chip/package.nix | 7 ++++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/za/zap-chip/dont-download-copyfiles-to-copy-files.patch b/pkgs/by-name/za/zap-chip/dont-download-copyfiles-to-copy-files.patch index 6b6e0307f48f..ff47f06f4671 100644 --- a/pkgs/by-name/za/zap-chip/dont-download-copyfiles-to-copy-files.patch +++ b/pkgs/by-name/za/zap-chip/dont-download-copyfiles-to-copy-files.patch @@ -1,28 +1,28 @@ diff --git a/src-script/pack-apack-win-linux.js b/src-script/pack-apack-win-linux.js -index 0120f9f9..41fcf99c 100644 +index 7eaaedc1..35b41431 100644 --- a/src-script/pack-apack-win-linux.js +++ b/src-script/pack-apack-win-linux.js -@@ -6,12 +6,12 @@ exports.default = async function (context) { +@@ -6,13 +6,13 @@ exports.default = async function (context) { context.electronPlatformName === 'win32' || context.electronPlatformName === 'linux' ) { -- return scriptUtil.executeCmd({}, 'npx', [ +- await scriptUtil.executeCmd({}, 'npx', [ - 'copyfiles', - '-V', - '-f', -- path.resolve(context.outDir, '../apack.json'), -- context.appOutDir -+ return scriptUtil.executeCmd({}, 'install', [ ++ await scriptUtil.executeCmd({}, 'install', [ + '-m466', + '-v', + '-Dt', + context.appOutDir, -+ path.resolve(context.outDir, '../apack.json') + path.resolve(context.outDir, '../apack.json'), + path.resolve(context.outDir, '../src/assets/zap.png'), +- context.appOutDir ]) + console.log('Files copied successfully.') } - } diff --git a/src-script/script-util.js b/src-script/script-util.js -index 1897c2b8..9faa5f20 100644 +index 1897c2b8..ed6bba12 100644 --- a/src-script/script-util.js +++ b/src-script/script-util.js @@ -181,11 +181,9 @@ async function rebuildBackendIfNeeded() { diff --git a/pkgs/by-name/za/zap-chip/package.nix b/pkgs/by-name/za/zap-chip/package.nix index c3f480105e65..12408bcd020a 100644 --- a/pkgs/by-name/za/zap-chip/package.nix +++ b/pkgs/by-name/za/zap-chip/package.nix @@ -11,16 +11,16 @@ buildNpmPackage rec { pname = "zap-chip"; - version = "2025.02.26"; + version = "2025.07.24"; src = fetchFromGitHub { owner = "project-chip"; repo = "zap"; rev = "v${version}"; - hash = "sha256-oYw1CxeCr4dUpw7hhXjtB+QwTfBI7rG9jgfxWKZYsSc="; + hash = "sha256-MGu4qr+iXqI+GTpThI8yCcjt0KAcEwgJJa7wSnbryco="; }; - npmDepsHash = "sha256-dcnJfxgF1S2gyR+wPnBD4AFzix5Sdq2ZqDlXvWAFb8s="; + npmDepsHash = "sha256-2AWqqMm91Ql9JA5oqon7H1YUuzJG+Z9c3LpsbQ9HE90="; env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; env.CYPRESS_INSTALL_BINARY = "0"; @@ -84,6 +84,7 @@ buildNpmPackage rec { meta = { description = "Generic generation engine and user interface for applications and libraries based on Zigbee Cluster Library (ZCL)"; changelog = "https://github.com/project-chip/zap/releases/tag/v${version}"; + homepage = "https://github.com/project-chip/zap"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ symphorien ]; mainProgram = "zap" + lib.optionalString (!withGui) "-cli"; From 6079ac3b0f42dfc91014803e1aa7303b6f7afbb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 10 Oct 2025 10:22:36 -0700 Subject: [PATCH 2/3] python3Packages.python-path: init at 0.1.3 --- .../python-modules/python-path/default.nix | 33 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/python-modules/python-path/default.nix diff --git a/pkgs/development/python-modules/python-path/default.nix b/pkgs/development/python-modules/python-path/default.nix new file mode 100644 index 000000000000..6ed6e7a323eb --- /dev/null +++ b/pkgs/development/python-modules/python-path/default.nix @@ -0,0 +1,33 @@ +{ + buildPythonPackage, + fetchPypi, + lib, + setuptools, +}: + +buildPythonPackage rec { + pname = "python-path"; + version = "0.1.3"; + pyproject = true; + + # no tags on GitHub + src = fetchPypi { + pname = "python_path"; + inherit version; + hash = "sha256-ti2arB2k2u4/A27QiFMs+LaGZtOqEDVn3CK2U5MWyLM="; + }; + + build-system = [ setuptools ]; + + pythonImportsCheck = [ "python_path" ]; + + # upstream has no tests + doCheck = false; + + meta = { + description = "Clean way to import scripts on other folders via a context manager"; + homepage = "https://github.com/cgarciae/python_path"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4703021f89a8..7e684ac2766c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15064,6 +15064,8 @@ self: super: with self; { python-pam = callPackage ../development/python-modules/python-pam { inherit (pkgs) pam; }; + python-path = callPackage ../development/python-modules/python-path { }; + python-periphery = callPackage ../development/python-modules/python-periphery { }; python-picnic-api2 = callPackage ../development/python-modules/python-picnic-api2 { }; From af961e01435c1cc16cf4c6dd0c2f46d677273c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 10 Oct 2025 10:01:34 -0700 Subject: [PATCH 3/3] python3Packages.home-assistant-chip-wheels: 2025.4.0 -> 2025.7.0 Diff: https://github.com/home-assistant-libs/chip-wheels/compare/2025.4.0...2025.7.0 Changelog: https://github.com/home-assistant-libs/chip-wheels/releases/tag/2025.7.0 --- .../home-assistant-chip-wheels/default.nix | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/home-assistant-chip-wheels/default.nix b/pkgs/development/python-modules/home-assistant-chip-wheels/default.nix index 5665f7eb2c9d..ae78ed9cb1d3 100644 --- a/pkgs/development/python-modules/home-assistant-chip-wheels/default.nix +++ b/pkgs/development/python-modules/home-assistant-chip-wheels/default.nix @@ -1,5 +1,6 @@ { aiohttp, + alive-progress, appdirs, appnope, black, @@ -10,6 +11,7 @@ coloredlogs, coverage, cryptography, + debugpy, diskcache, fetchFromGitHub, fetchpatch, @@ -40,6 +42,7 @@ psutil, ptpython, pyelftools, + pyfakefs, pygments, pykwalify, pylint, @@ -47,6 +50,7 @@ pyserial, python, python-daemon, + python-path, pythonOlder, pyyaml, requests, @@ -57,6 +61,7 @@ sphinx-design, stdenv, stringcase, + tabulate, toml, tornado, types-protobuf, @@ -72,14 +77,14 @@ stdenv.mkDerivation rec { pname = "home-assistant-chip-wheels"; - version = "2025.4.0"; + version = "2025.7.0"; src = fetchFromGitHub { owner = "home-assistant-libs"; repo = "chip-wheels"; tag = version; fetchSubmodules = false; leaveDotGit = true; - hash = "sha256-20dqVXHPgSxBveTxlbHEjTtp9NI1oVCVpBTDbjDI2QA="; + hash = "sha256-SfhsM2RPghFPx0qtoHsXVymwmOWFiEGAyLx6FeB++dg="; postFetch = '' cd $out # Download connectedhomeip. @@ -115,6 +120,7 @@ stdenv.mkDerivation rec { click jinja2 lark + python-path setuptools stringcase build @@ -140,6 +146,14 @@ stdenv.mkDerivation rec { extraPrefix = "connectedhomeip/third_party/pigweed/repo/"; hash = "sha256-6ss3j8j69w7EMio9mFP/EL2oPqQ2sLh67eWsJjHdDa8="; }) + # fix `ModuleNotFoundError: No module named 'matter'` + # https://github.com/project-chip/connectedhomeip/pull/39826 + (fetchpatch { + url = "https://github.com/project-chip/connectedhomeip/commit/78c6a7e15658f66658eb9f780e1a0c0c176a67d7.patch"; + stripLen = 1; + extraPrefix = "connectedhomeip/"; + hash = "sha256-s5t9DvmZVpnVelrN9+Ekn0OJl/VouXUGKCgu/PTLHBI="; + }) ]; postPatch = '' @@ -155,7 +169,7 @@ stdenv.mkDerivation rec { # unpin dependencies # there are many files to modify, in different formats sed -i 's/==.*$//' third_party/pigweed/repo/pw_env_setup/py/pw_env_setup/virtualenv_setup/python_base_requirements.txt - sed -i 's/==[^;]*//' scripts/setup/constraints.txt + sed -i 's/==[^;]*//' scripts/setup/constraints.txt scripts/tests/requirements.txt sed -i 's/\(^ \+[a-zA-Z0-9-]*\)[=~><]=[^;]*/\1/' third_party/pigweed/repo/pw_protobuf_compiler/py/setup.cfg third_party/pigweed/repo/pw_protobuf/py/setup.cfg third_party/pigweed/repo/pw_protobuf_compiler/py/setup.cfg # remove a few dependencies not packaged in nixpkgs and which are apparently # not needed to build the python bindings of chip @@ -166,6 +180,11 @@ stdenv.mkDerivation rec { # some code is generated by a templating tool (zap-cli) scripts/codepregen.py ./zzz_pregenerated/ + + # `pip._internal.exceptions.InstallationError: ''${PW_PROJECT_ROOT}/scripts/py_matter_idl is not a valid editable requirement` + substituteInPlace scripts/tests/requirements.txt \ + --replace-fail '-e ''${PW_PROJECT_ROOT}/scripts/py_matter_idl' "" \ + --replace-fail '-e ''${PW_PROJECT_ROOT}/scripts/py_matter_yamltests' "" ''; # the python parts of the build system work as follows @@ -188,6 +207,7 @@ stdenv.mkDerivation rec { let dependencies = [ aiohttp + alive-progress appdirs appnope black @@ -197,6 +217,7 @@ stdenv.mkDerivation rec { coverage click cryptography + debugpy diskcache googleapis-common-protos google-cloud-storage @@ -217,13 +238,15 @@ stdenv.mkDerivation rec { protobuf psutil ptpython + pyfakefs pyelftools pygments pykwalify - (pylint.overridePythonAttrs { doCheck = pythonOlder "3.13"; }) + pylint pyperclip pyserial python-daemon + python-path pyyaml requests setuptools @@ -232,6 +255,7 @@ stdenv.mkDerivation rec { sphinx-argparse sphinx-design stringcase + tabulate toml tornado types-protobuf