mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
It is more common to specify hash as the last attribute of fetcher
function args. Let's move fetcherVersion right above hash for all
occurrences.
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
(cherry picked from commit a8c9a2aa3e)
75 lines
1.7 KiB
Nix
75 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
nodejs,
|
|
npmHooks,
|
|
pnpm_9,
|
|
systemdMinimal,
|
|
nixosTests,
|
|
nix-update-script,
|
|
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal,
|
|
}:
|
|
|
|
let
|
|
pnpm = pnpm_9;
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "zigbee2mqtt";
|
|
version = "2.4.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Koenkk";
|
|
repo = "zigbee2mqtt";
|
|
tag = finalAttrs.version;
|
|
hash = "sha256-azgZzw1Bgqepg6UM8INbMGZRerbafGJWQfqSEepPf1I=";
|
|
};
|
|
|
|
pnpmDeps = pnpm.fetchDeps {
|
|
inherit (finalAttrs) pname version src;
|
|
fetcherVersion = 1;
|
|
hash = "sha256-Uli0skvkAyVbKdna9MTWoQzK3V7puM7gd7GzCk7tS78=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
nodejs
|
|
npmHooks.npmInstallHook
|
|
pnpm.configHook
|
|
];
|
|
|
|
buildInputs = lib.optionals withSystemd [
|
|
systemdMinimal
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
pnpm run build
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
dontNpmPrune = true;
|
|
|
|
passthru.tests.zigbee2mqtt = nixosTests.zigbee2mqtt_2;
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/Koenkk/zigbee2mqtt/releases/tag/${finalAttrs.version}";
|
|
description = "Zigbee to MQTT bridge using zigbee-shepherd";
|
|
homepage = "https://github.com/Koenkk/zigbee2mqtt";
|
|
license = licenses.gpl3;
|
|
longDescription = ''
|
|
Allows you to use your Zigbee devices without the vendor's bridge or gateway.
|
|
|
|
It bridges events and allows you to control your Zigbee devices via MQTT.
|
|
In this way you can integrate your Zigbee devices with whatever smart home infrastructure you are using.
|
|
'';
|
|
maintainers = with maintainers; [
|
|
sweber
|
|
hexa
|
|
];
|
|
mainProgram = "zigbee2mqtt";
|
|
};
|
|
})
|