mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
48 lines
1.3 KiB
Nix
48 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, buildNpmPackage
|
|
, fetchFromGitHub
|
|
, systemdMinimal
|
|
, nixosTests
|
|
, nix-update-script
|
|
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemdMinimal
|
|
}:
|
|
|
|
buildNpmPackage rec {
|
|
pname = "zigbee2mqtt";
|
|
version = "1.41.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Koenkk";
|
|
repo = "zigbee2mqtt";
|
|
rev = version;
|
|
hash = "sha256-WIU3fTONRckPmSdW5DJXripsf4QdEZM7UBVSru7JqYc=";
|
|
};
|
|
|
|
npmDepsHash = "sha256-yCFhHJCBSc8tCWib9ffqBg4sF9VURx+nXln9ghmBpyM=";
|
|
|
|
buildInputs = lib.optionals withSystemd [
|
|
systemdMinimal
|
|
];
|
|
|
|
npmFlags = lib.optionals (!withSystemd) [ "--omit=optional" ];
|
|
|
|
passthru.tests.zigbee2mqtt = nixosTests.zigbee2mqtt;
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/Koenkk/zigbee2mqtt/releases/tag/${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";
|
|
};
|
|
}
|