From fec2da645a82daf7ac91e5a31aea3a138ab57a5f Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sat, 30 May 2026 12:00:00 +0000 Subject: [PATCH 1/2] zap-chip-gui: remove the gui starts up but does not seem functional. There is probably no point in keeping the gui variant. home-assistant only needs the cli. --- pkgs/by-name/za/zap-chip/package.nix | 26 +------------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 -- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/pkgs/by-name/za/zap-chip/package.nix b/pkgs/by-name/za/zap-chip/package.nix index dfb9b0a3967c..6602468b5aa9 100644 --- a/pkgs/by-name/za/zap-chip/package.nix +++ b/pkgs/by-name/za/zap-chip/package.nix @@ -2,11 +2,9 @@ lib, stdenv, buildNpmPackage, - electron, fetchFromGitHub, writers, makeWrapper, - withGui ? false, }: buildNpmPackage rec { @@ -55,35 +53,13 @@ buildNpmPackage rec { cat .version.json ''; - postBuild = lib.optionalString withGui '' - npm exec electron-builder -- \ - --dir \ - -c.electronDist=${electron.dist} \ - -c.electronVersion=${electron.version} - ''; - nativeBuildInputs = [ makeWrapper ]; postInstall = '' # this file is also used at runtime install -m644 .version.json $out/lib/node_modules/zap/ - '' - + lib.optionalString (!withGui) '' # home-assistant chip-* python packages need the executable under the name zap-cli mv $out/bin/zap $out/bin/zap-cli - '' - + lib.optionalString withGui '' - pushd dist/linux-*unpacked - mkdir -p $out/opt/zap-chip - cp -r locales resources{,.pak} $out/opt/zap-chip - popd - - rm $out/bin/zap - makeWrapper '${lib.getExe electron}' "$out/bin/zap" \ - --add-flags $out/opt/zap-chip/resources/app.asar \ - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ - --set-default ELECTRON_IS_DEV 0 \ - --inherit-argv0 ''; meta = { @@ -92,7 +68,7 @@ buildNpmPackage rec { homepage = "https://github.com/project-chip/zap"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ symphorien ]; - mainProgram = "zap" + lib.optionalString (!withGui) "-cli"; + mainProgram = "zap-cli"; broken = stdenv.hostPlatform.isDarwin; }; } diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6d85a8eecd08..3ff87caead2e 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -2626,6 +2626,7 @@ mapAliases { zabbix72 = throw "'zabbix72' was removed as it has reached its end of life"; # Added 2026-02-11 zandronum-alpha = throw "'zandronum-alpha' has been removed as it was broken and the stable version has caught up"; # Added 2025-10-19 zandronum-alpha-server = throw "'zandronum-alpha-server' has been removed as it was broken and the stable version has caught up"; # Added 2025-10-19 + zap-chip-gui = throw "the gui variant of zap-chip was removed as it was not really functional"; # Added 2026-05-30 zbackup = throw "'zbackup' has been removed due to being unmaintained upstream"; # Added 2025-08-22 zdoom = throw "'zdoom' has been removed as it was broken and unmaintained upstream. Consider using UZDoom instead."; # Added 2026-04-04 zeal-qt5 = warnAlias "'zeal-qt5' has been removed from nixpkgs. Please use 'zeal' instead" zeal; # Added 2025-08-31 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 412eb9b256dd..6e75afea6859 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11778,8 +11778,6 @@ with pkgs; yamale = with python3Packages; toPythonApplication yamale; - zap-chip-gui = zap-chip.override { withGui = true; }; - myEnvFun = callPackage ../misc/my-env { inherit (stdenv) mkDerivation; }; From 880a1ba0187a2616ce1664da6ed6149cbcf498a0 Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sat, 30 May 2026 12:00:00 +0000 Subject: [PATCH 2/2] zap-chip: 2026.02.26 -> 2026.05.21 --- pkgs/by-name/za/zap-chip/package.nix | 7 ++- .../za/zap-chip/universal-npm-lock.patch | 56 ++++++++++--------- 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/pkgs/by-name/za/zap-chip/package.nix b/pkgs/by-name/za/zap-chip/package.nix index 6602468b5aa9..5ac7bcc71a92 100644 --- a/pkgs/by-name/za/zap-chip/package.nix +++ b/pkgs/by-name/za/zap-chip/package.nix @@ -9,16 +9,16 @@ buildNpmPackage rec { pname = "zap-chip"; - version = "2026.02.26"; + version = "2026.05.21"; src = fetchFromGitHub { owner = "project-chip"; repo = "zap"; rev = "v${version}"; - hash = "sha256-iAubYY/gFVjqNGnI8PIv3twc5j/8a46ycAiaZ7nw1VY="; + hash = "sha256-rX8WTaQQbVWlabMEvv5SCalxy0XmB5jFpCk1uQCbunM="; }; - npmDepsHash = "sha256-SIworjSX2SLiNA2Oshvem0mOW795WkbHWP8WFD9yp8g="; + npmDepsHash = "sha256-R95ljHvKPGyJh3tlWI1feo9HVE7abPLVLzScqReJBPw="; env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1"; env.CYPRESS_INSTALL_BINARY = "0"; @@ -27,6 +27,7 @@ buildNpmPackage rec { # The release's package-lock.json file is not universal. It misses # architecture-related packages, caused by an NPM bug. Add these to the # lock otherwise `npm ci` complains. + # Regenerate the patch by `npm install --package-lock-only` # https://github.com/npm/cli/issues/8805 ./universal-npm-lock.patch # the build system creates a file `.version.json` from a git command diff --git a/pkgs/by-name/za/zap-chip/universal-npm-lock.patch b/pkgs/by-name/za/zap-chip/universal-npm-lock.patch index ef97b5372d22..595e990acdef 100644 --- a/pkgs/by-name/za/zap-chip/universal-npm-lock.patch +++ b/pkgs/by-name/za/zap-chip/universal-npm-lock.patch @@ -1,33 +1,8 @@ diff --git a/package-lock.json b/package-lock.json -index 3034c5e47fdd..b6cf9a9995b9 100644 +index cb7db10b..10a4b683 100644 --- a/package-lock.json +++ b/package-lock.json -@@ -81,20 +81,20 @@ - "eslint-plugin-vue": "^9.27.0", - "eslint-webpack-plugin": "^4.2.0", - "folder-hash": "^4.0.1", -- "husky": "^9.1.7", -+ "husky": "9.1.7", - "is-reachable": "^5.2.1", - "jest": "^29.2.2", - "jest-junit": "^16.0.0", - "jest-sonar-reporter": "^2.0.0", -- "jsdoc": "^4.0.5", -+ "jsdoc": "4.0.5", - "jsdoc-to-markdown": "^8.0.3", - "license-checker": "^25.0.1", - "node-7z": "^3.0.0", - "node-gyp": "^10.2.0", - "nodejs-file-downloader": "^4.9.3", - "octokit": "^1.7.2", -- "prettier": "^3.6.2", -- "pretty-quick": "^4.2.2", -+ "prettier": "3.6.2", -+ "pretty-quick": "4.2.2", - "sonar-scanner": "^3.1.0", - "test-utils": "^1.1.1", - "typescript": "4.6", -@@ -6071,6 +6071,246 @@ +@@ -6116,6 +6116,273 @@ } } }, @@ -99,6 +74,9 @@ index 3034c5e47fdd..b6cf9a9995b9 100644 + "arm" + ], + "dev": true, ++ "libc": [ ++ "glibc" ++ ], + "license": "MIT", + "optional": true, + "os": [ @@ -114,6 +92,9 @@ index 3034c5e47fdd..b6cf9a9995b9 100644 + "arm" + ], + "dev": true, ++ "libc": [ ++ "musl" ++ ], + "license": "MIT", + "optional": true, + "os": [ @@ -129,6 +110,9 @@ index 3034c5e47fdd..b6cf9a9995b9 100644 + "arm64" + ], + "dev": true, ++ "libc": [ ++ "glibc" ++ ], + "license": "MIT", + "optional": true, + "os": [ @@ -144,6 +128,9 @@ index 3034c5e47fdd..b6cf9a9995b9 100644 + "arm64" + ], + "dev": true, ++ "libc": [ ++ "musl" ++ ], + "license": "MIT", + "optional": true, + "os": [ @@ -159,6 +146,9 @@ index 3034c5e47fdd..b6cf9a9995b9 100644 + "ppc64" + ], + "dev": true, ++ "libc": [ ++ "glibc" ++ ], + "license": "MIT", + "optional": true, + "os": [ @@ -174,6 +164,9 @@ index 3034c5e47fdd..b6cf9a9995b9 100644 + "riscv64" + ], + "dev": true, ++ "libc": [ ++ "glibc" ++ ], + "license": "MIT", + "optional": true, + "os": [ @@ -189,6 +182,9 @@ index 3034c5e47fdd..b6cf9a9995b9 100644 + "s390x" + ], + "dev": true, ++ "libc": [ ++ "glibc" ++ ], + "license": "MIT", + "optional": true, + "os": [ @@ -204,6 +200,9 @@ index 3034c5e47fdd..b6cf9a9995b9 100644 + "x64" + ], + "dev": true, ++ "libc": [ ++ "glibc" ++ ], + "license": "MIT", + "optional": true, + "os": [ @@ -219,6 +218,9 @@ index 3034c5e47fdd..b6cf9a9995b9 100644 + "x64" + ], + "dev": true, ++ "libc": [ ++ "musl" ++ ], + "license": "MIT", + "optional": true, + "os": [