2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv,
|
2021-09-03 09:24:14 +01:00
|
|
|
fetchFromGitHub,
|
2020-04-30 12:49:28 +01:00
|
|
|
makeWrapper,
|
|
|
|
cmake,
|
|
|
|
python3,
|
|
|
|
openssl,
|
|
|
|
pkg-config,
|
|
|
|
mosquitto,
|
|
|
|
lua5_3,
|
|
|
|
sqlite,
|
|
|
|
jsoncpp,
|
|
|
|
zlib,
|
|
|
|
boost,
|
|
|
|
curl,
|
|
|
|
git,
|
|
|
|
libusb-compat-0_1,
|
|
|
|
cereal
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-25 22:53:02 +01:00
|
|
|
pname = "domoticz";
|
2021-09-03 09:24:14 +01:00
|
|
|
version = "2021.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "domoticz";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "03s1fx2ilhiq47p99c6iln1fi0rhdcxxsrv1zaww7f7bc744vzbk";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
2020-04-30 12:49:28 +01:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
python3
|
|
|
|
mosquitto
|
|
|
|
lua5_3
|
|
|
|
sqlite
|
|
|
|
jsoncpp
|
|
|
|
boost
|
|
|
|
zlib
|
|
|
|
curl
|
|
|
|
git
|
|
|
|
libusb-compat-0_1
|
|
|
|
cereal
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
|
|
|
"-DUSE_BUILTIN_MQTT=false"
|
|
|
|
"-DUSE_BUILTIN_LUA=false"
|
|
|
|
"-DUSE_BUILTIN_SQLITE=false"
|
|
|
|
"-DUSE_BUILTIN_JSONCPP=false"
|
|
|
|
"-DUSE_BUILTIN_ZLIB=false"
|
|
|
|
"-DUSE_OPENSSL_STATIC=false"
|
|
|
|
"-DUSE_STATIC_BOOST=false"
|
|
|
|
"-DUSE_BUILTIN_MINIZIP=true"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/domoticz
|
|
|
|
cp -r $src/www $out/share/domoticz/
|
|
|
|
cp -r $src/Config $out/share/domoticz
|
|
|
|
cp -r $src/scripts $out/share/domoticz
|
|
|
|
cp -r $src/plugins $out/share/domoticz
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp domoticz $out/bin
|
|
|
|
wrapProgram $out/bin/domoticz --set LD_LIBRARY_PATH ${python3}/lib;
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-30 12:49:28 +01:00
|
|
|
description = "Home automation system";
|
|
|
|
longDescription = ''
|
|
|
|
Domoticz is a home automation system that lets you monitor and configure
|
|
|
|
various devices like: lights, switches, various sensors/meters like
|
|
|
|
temperature, rain, wind, UV, electra, gas, water and much more
|
|
|
|
'';
|
|
|
|
maintainers = with maintainers; [ edcragg ];
|
|
|
|
homepage = "https://www.domoticz.com/";
|
2020-10-11 11:11:50 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-30 12:49:28 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|