2018-04-07 19:11:56 +01:00
|
|
|
{ stdenv, fetchFromGitHub
|
|
|
|
, doxygen, fontconfig, graphviz-nox, libxml2, pkgconfig, which
|
|
|
|
, systemd }:
|
|
|
|
|
|
|
|
let
|
2019-12-31 15:46:23 +00:00
|
|
|
version = "2019-12-08";
|
2018-04-07 19:11:56 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "openzwave";
|
|
|
|
inherit version;
|
2018-04-07 19:11:56 +01:00
|
|
|
|
2018-11-12 10:19:11 +00:00
|
|
|
# Use fork by Home Assistant because this package is mainly used for python.pkgs.homeassistant-pyozw.
|
|
|
|
# See https://github.com/OpenZWave/open-zwave/compare/master...home-assistant:hass for the difference.
|
2018-04-07 19:11:56 +01:00
|
|
|
src = fetchFromGitHub {
|
2018-11-12 10:19:11 +00:00
|
|
|
owner = "home-assistant";
|
2018-04-07 19:11:56 +01:00
|
|
|
repo = "open-zwave";
|
2019-12-31 15:46:23 +00:00
|
|
|
rev = "2cd2137025c529835e4893a7b87c3d56605b2681";
|
|
|
|
sha256 = "04g8fb4f4ihakvvsmzcnncgfdd2ikmki7s22i9c6layzdwavbwf1";
|
2018-04-07 19:11:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkgconfig which ];
|
|
|
|
|
|
|
|
buildInputs = [ systemd ];
|
|
|
|
|
2018-06-11 23:55:44 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2018-04-07 19:11:56 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
DESTDIR=$out PREFIX= pkgconfigdir=lib/pkgconfig make install $installFlags
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
FONTCONFIG_FILE="${fontconfig.out}/etc/fonts/fonts.conf";
|
|
|
|
FONTCONFIG_PATH="${fontconfig.out}/etc/fonts/";
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace cpp/src/Options.cpp \
|
|
|
|
--replace /etc/openzwave $out/etc/openzwave
|
|
|
|
'';
|
|
|
|
|
|
|
|
fixupPhase = ''
|
|
|
|
substituteInPlace $out/lib/pkgconfig/libopenzwave.pc \
|
|
|
|
--replace prefix= prefix=$out \
|
|
|
|
--replace dir= dir=$out
|
|
|
|
|
|
|
|
substituteInPlace $out/bin/ozw_config \
|
|
|
|
--replace pcfile=${pkgconfig} pcfile=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "C++ library to control Z-Wave Networks via a USB Z-Wave Controller";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.openzwave.net/";
|
2018-04-07 19:11:56 +01:00
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ etu ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|