Merge pull request #253885 from bjornfor/add-deconz
deconz: init at 2.23.00
This commit is contained in:
commit
230262cda5
2 changed files with 85 additions and 0 deletions
83
pkgs/servers/deconz/default.nix
Normal file
83
pkgs/servers/deconz/default.nix
Normal file
|
@ -0,0 +1,83 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, wrapQtAppsHook
|
||||
, dpkg
|
||||
, autoPatchelfHook
|
||||
, qtserialport
|
||||
, qtwebsockets
|
||||
, openssl
|
||||
, libredirect
|
||||
, makeWrapper
|
||||
, gzip
|
||||
, gnutar
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "deconz";
|
||||
version = "2.23.00";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://deconz.dresden-elektronik.de/ubuntu/beta/deconz-${version}-qt5.deb";
|
||||
sha256 = "sha256-TMftm1fz8c8ndSyA3HUd7JWT0DINxvbdUSDrmVMwmws=";
|
||||
};
|
||||
|
||||
devsrc = fetchurl {
|
||||
url = "https://deconz.dresden-elektronik.de/ubuntu/beta/deconz-dev-${version}.deb";
|
||||
sha256 = "sha256-uW5iF3rvFlowFhMBVDTOHkJ2K4LBgAxxC79tXpMhy5U=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg autoPatchelfHook makeWrapper wrapQtAppsHook ];
|
||||
|
||||
buildInputs = [ qtserialport qtwebsockets openssl ];
|
||||
|
||||
unpackPhase = ''
|
||||
runHook preUnpack
|
||||
|
||||
dpkg -x $src ./deconz-src
|
||||
dpkg -x $devsrc ./deconz-devsrc
|
||||
|
||||
runHook postUnpack
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out"
|
||||
cp -r deconz-src/* "$out"
|
||||
cp -r deconz-devsrc/* "$out"
|
||||
|
||||
# Flatten /usr and manually merge lib/ and usr/lib/, since mv refuses to.
|
||||
mv "$out/lib" "$out/orig_lib"
|
||||
mv "$out/usr/"* "$out/"
|
||||
mkdir -p "$out/lib/systemd/system/"
|
||||
mv "$out/orig_lib/systemd/system/"* "$out/lib/systemd/system/"
|
||||
rmdir "$out/orig_lib/systemd/system"
|
||||
rmdir "$out/orig_lib/systemd"
|
||||
rmdir "$out/orig_lib"
|
||||
rmdir "$out/usr"
|
||||
|
||||
for f in "$out/lib/systemd/system/"*.service \
|
||||
"$out/share/applications/"*.desktop; do
|
||||
substituteInPlace "$f" \
|
||||
--replace "/usr/" "$out/"
|
||||
done
|
||||
|
||||
for p in "$out/bin/deCONZ" "$out/bin/GCFFlasher_internal.bin"; do
|
||||
wrapProgram "$p" \
|
||||
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
|
||||
--set NIX_REDIRECTS "/usr/share=$out/share:/usr/bin=$out/bin" \
|
||||
--prefix PATH : "${lib.makeBinPath [ gzip gnutar ]}"
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Manage Zigbee network with ConBee, ConBee II or RaspBee hardware";
|
||||
homepage = "https://www.dresden-elektronik.com/wireless/software/deconz.html";
|
||||
license = licenses.unfree;
|
||||
platforms = with platforms; linux;
|
||||
maintainers = with maintainers; [ bjornfor ];
|
||||
};
|
||||
}
|
|
@ -26455,6 +26455,8 @@ with pkgs;
|
|||
|
||||
dcnnt = python3Packages.callPackage ../servers/dcnnt { };
|
||||
|
||||
deconz = qt5.callPackage ../servers/deconz { };
|
||||
|
||||
dendrite = callPackage ../servers/dendrite { };
|
||||
|
||||
dex-oidc = callPackage ../servers/dex { };
|
||||
|
|
Loading…
Reference in a new issue