Skip to content

Commit

Permalink
Merge pull request NixOS#262521 from mweinelt/matter-server-fixes
Browse files Browse the repository at this point in the history
python-matter-server: include server extra
  • Loading branch information
mweinelt authored Oct 28, 2023
2 parents de47b2e + f22e146 commit 0276fc0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

buildPythonPackage rec {
pname = "home-assistant-chip-clusters";
version = "2023.6.0";
version = "2023.10.1";
format = "wheel";

src = fetchPypi {
inherit format version;
pname = "home_assistant_chip_clusters";
dist = "py3";
python = "py3";
hash = "sha256-8LYB3BEDHOj6ItfFRK7ewbhjN604xXKY0YlymNjEO+g=";
hash = "sha256-KI5idrD8SIpzSYopELYWJJaaiAFQzwRwhFBfb4BEw2o=";
};

propagatedBuildInputs = [
Expand All @@ -25,6 +25,8 @@ buildPythonPackage rec {

pythonImportsCheck = [
"chip.clusters"
"chip.clusters.ClusterObjects"
"chip.tlv"
];

doCheck = false; # no tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

buildPythonPackage rec {
pname = "home-assistant-chip-core";
version = "2023.6.0";
version = "2023.10.1";
format = "wheel";

disabled = pythonOlder "3.7";
Expand All @@ -41,7 +41,7 @@ buildPythonPackage rec {
};
"x86_64-linux" = {
name = "x86_64";
hash = "sha256-bRP82jTVSJS46WuO8MVWFvte+2mCOSsGFDBaXdmdPHI=";
hash = "sha256-mffjJtn0LmRz9DOWMMw9soYDDm/M1C5Tdj6YbWHaq2o=";
};
}.${stdenv.system} or (throw "Unsupported system");
in fetchPypi {
Expand Down Expand Up @@ -78,12 +78,17 @@ buildPythonPackage rec {
pygobject3
];

pythonNamespaces = [
"chip"
"chip.clusters"
];

pythonImportsCheck = [
"chip"
"chip.ble"
# https://github.com/project-chip/connectedhomeip/pull/24376
#"chip.configuration"
"chip.configuration"
"chip.discovery"
"chip.exceptions"
"chip.native"
"chip.storage"
];
Expand Down
14 changes: 2 additions & 12 deletions pkgs/development/python-modules/python-matter-server/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, pythonOlder

# build
Expand Down Expand Up @@ -29,7 +28,7 @@

buildPythonPackage rec {
pname = "python-matter-server";
version = "3.7.0";
version = "4.0.0";
format = "pyproject";

disabled = pythonOlder "3.10";
Expand All @@ -38,18 +37,9 @@ buildPythonPackage rec {
owner = "home-assistant-libs";
repo = "python-matter-server";
rev = "refs/tags/${version}";
hash = "sha256-t++7jQreibGpJRjJawicxjFIye5X6R1dpFqiM6yvRf0=";
hash = "sha256-7MBQo4jzBU/n7gVdGzVHlQl8Vj3OjfK4gk1vhLQQUE0=";
};

patches = [
# https://github.com/home-assistant-libs/python-matter-server/pull/379
(fetchpatch {
name = "relax-setuptools-dependency.patch";
url = "https://github.com/home-assistant-libs/python-matter-server/commit/1bbc945634db92ea081051645b03c3d9c358fb15.patch";
hash = "sha256-kTu1+IwDrcdqelyK/vfhxw8MQBis5I1jag7YTytKQhs=";
})
];

nativeBuildInputs = [
setuptools
wheel
Expand Down
6 changes: 5 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19650,7 +19650,11 @@ with pkgs;

mermerd = callPackage ../development/tools/database/mermerd { };

python-matter-server = with python3Packages; toPythonApplication python-matter-server;
python-matter-server = with python3Packages; toPythonApplication (
python-matter-server.overridePythonAttrs (oldAttrs: {
propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ oldAttrs.passthru.optional-dependencies.server;
})
);

minify = callPackage ../development/web/minify { };

Expand Down

0 comments on commit 0276fc0

Please sign in to comment.