nixos-config/pkgs/deconz/default.nix

43 lines
1.3 KiB
Nix
Raw Normal View History

2021-02-02 18:31:25 +01:00
{ lib, fetchurl, mkDerivation, dpkg, autoPatchelfHook, qtserialport
, qtwebsockets, libredirect, makeWrapper, gzip, gnutar }:
2020-10-07 14:37:57 +02:00
mkDerivation rec {
name = "deconz-${version}";
2021-02-14 23:50:18 +01:00
version = "2.09.03";
2020-10-07 14:37:57 +02:00
src = fetchurl {
2021-02-14 23:50:18 +01:00
url = "https://deconz.dresden-elektronik.de/debian/stable/deconz_${version}-debian-stretch-stable_arm64.deb";
sha256 = "6EXYoXOg+6dTR9/hRHmNafZuBeNnAAS4z8ia15s1+9U=";
2020-10-07 14:37:57 +02:00
};
nativeBuildInputs = [ dpkg autoPatchelfHook makeWrapper ];
buildInputs = [ qtserialport qtwebsockets ];
unpackPhase = "dpkg-deb -x $src .";
installPhase = ''
mkdir -p "$out"
cp -r usr/* .
cp -r share/deCONZ/plugins/* lib/
cp -r . $out
wrapProgram "$out/bin/deCONZ" \
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
--set NIX_REDIRECTS "/usr/share=$out/share:/usr/bin=$out/bin" \
2021-02-02 18:31:25 +01:00
--prefix PATH : "${lib.makeBinPath [ gzip gnutar ]}"
2020-10-07 14:37:57 +02:00
'';
2021-02-02 18:31:25 +01:00
meta = with lib; {
description =
"Manage ZigBee network with ConBee, ConBee II or RaspBee hardware";
2020-10-07 14:37:57 +02:00
# 2019-08-19: The homepage links to old software that doesn't even work --
# it fails to detect ConBee2.
2021-02-02 18:31:25 +01:00
homepage =
"https://www.dresden-elektronik.de/funktechnik/products/software/pc-software/deconz/?L=1";
2020-10-07 14:37:57 +02:00
license = licenses.unfree;
platforms = with platforms; linux;
maintainers = with maintainers; [ felschr ];
};
}