1{ lib, stdenv, fetchFromGitHub, fetchpatch
2, doxygen, fontconfig, graphviz-nox, libxml2, pkg-config, which
3, systemd }:
4
5stdenv.mkDerivation rec {
6 pname = "openzwave";
7 version = "1.6-unstable-2022-11-17";
8
9 src = fetchFromGitHub {
10 owner = "OpenZWave";
11 repo = "open-zwave";
12 rev = "3fff11d246a0d558d26110e1db6bd634a1b347c0";
13 hash = "sha256-CLK2MeoTmZ8GMKb1OAZFNLyc4C+k+REK2w+WQxZv0/E=";
14 };
15
16 outputs = [ "out" "doc" ];
17
18 nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkg-config which ];
19
20 buildInputs = [ systemd ];
21
22 hardeningDisable = [ "format" ];
23
24 enableParallelBuilding = true;
25
26 makeFlags = [
27 "PREFIX=${placeholder "out"}"
28 ];
29
30 FONTCONFIG_FILE="${fontconfig.out}/etc/fonts/fonts.conf";
31 FONTCONFIG_PATH="${fontconfig.out}/etc/fonts/";
32
33 postPatch = ''
34 substituteInPlace cpp/src/Options.cpp \
35 --replace /etc/openzwave $out/etc/openzwave
36 substituteInPlace cpp/build/Makefile \
37 --replace "-Werror" "-Werror -Wno-format"
38 '';
39
40 meta = with lib; {
41 description = "C++ library to control Z-Wave Networks via a USB Z-Wave Controller";
42 homepage = "http://www.openzwave.net/";
43 license = licenses.gpl3;
44 maintainers = [ ];
45 platforms = platforms.linux;
46 };
47}