2022-08-03 01:30:46 +02:00
|
|
|
{ lib, stdenv, fetchurl, mkDerivation, dpkg, autoPatchelfHook, qtserialport
|
2021-02-02 18:31:25 +01:00
|
|
|
, qtwebsockets, libredirect, makeWrapper, gzip, gnutar }:
|
2020-10-07 14:37:57 +02:00
|
|
|
|
2022-08-03 01:30:46 +02:00
|
|
|
let
|
|
|
|
version = "2.17.01";
|
|
|
|
srcs = {
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url =
|
|
|
|
"https://deconz.dresden-elektronik.de/ubuntu/beta/deconz-${version}-qt5.deb";
|
|
|
|
sha256 = "sha256-c2G3oOnSXlivO9KXRBZIe2DEuq7vPVlNDKF6T/pZLps=";
|
|
|
|
};
|
|
|
|
|
|
|
|
aarch64-linux = fetchurl {
|
|
|
|
url =
|
|
|
|
"https://deconz.dresden-elektronik.de/debian/stable/deconz_${version}-debian-buster-stable_arm64.deb";
|
|
|
|
sha256 = "sha256-zuy4e9bzcRqDeXP6mfzZLCDK/3we25LH6xktnO6HXps=";
|
|
|
|
};
|
2020-10-07 14:37:57 +02:00
|
|
|
};
|
|
|
|
|
2022-08-03 01:30:46 +02:00
|
|
|
in mkDerivation rec {
|
|
|
|
pname = "deCONZ";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = srcs.${stdenv.hostPlatform.system};
|
|
|
|
|
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;
|
2022-08-03 01:30:46 +02:00
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
2020-10-07 14:37:57 +02:00
|
|
|
maintainers = with maintainers; [ felschr ];
|
|
|
|
};
|
|
|
|
}
|