mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
zap-chip: split GUI off into zap-chip-gui
This commit is contained in:
parent
8ebd730319
commit
3d28eb3b7b
|
@ -4,6 +4,7 @@
|
|||
electron_31,
|
||||
fetchFromGitHub,
|
||||
writers,
|
||||
withGui ? false,
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -50,25 +51,28 @@ buildNpmPackage rec {
|
|||
cat .version.json
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
postBuild = lib.optionalString withGui ''
|
||||
npm exec electron-builder -- \
|
||||
--dir \
|
||||
-c.electronDist=${electron.dist} \
|
||||
-c.electronVersion=${electron.version}
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# this file is also used at runtime
|
||||
install -m644 .version.json $out/lib/node_modules/zap/
|
||||
# home-assistant chip-* python packages need the executable under the name zap-cli
|
||||
ln -s $out/bin/zap $out/bin/zap-cli
|
||||
'';
|
||||
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
|
||||
'';
|
||||
|
||||
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}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ symphorien ];
|
||||
mainProgram = "zap-cli";
|
||||
mainProgram = "zap" + lib.optionalString (!withGui) "-cli";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -19094,6 +19094,8 @@ with pkgs;
|
|||
|
||||
yandex-browser-corporate = yandex-browser.override { edition = "corporate"; };
|
||||
|
||||
zap-chip-gui = zap-chip.override { withGui = true; };
|
||||
|
||||
myEnvFun = callPackage ../misc/my-env {
|
||||
inherit (stdenv) mkDerivation;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue