openzwave: 2019-12-08 -> 1.6, use official version
This commit is contained in:
parent
a82f4038d3
commit
a41546b597
@ -1,23 +1,33 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub
|
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
||||||
, doxygen, fontconfig, graphviz-nox, libxml2, pkg-config, which
|
, doxygen, fontconfig, graphviz-nox, libxml2, pkg-config, which
|
||||||
, systemd }:
|
, systemd }:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
version = "2019-12-08";
|
|
||||||
|
|
||||||
in stdenv.mkDerivation {
|
|
||||||
pname = "openzwave";
|
pname = "openzwave";
|
||||||
inherit version;
|
version = "1.6";
|
||||||
|
|
||||||
# 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.
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "home-assistant";
|
owner = "OpenZWave";
|
||||||
repo = "open-zwave";
|
repo = "open-zwave";
|
||||||
rev = "2cd2137025c529835e4893a7b87c3d56605b2681";
|
rev = "v${version}";
|
||||||
sha256 = "04g8fb4f4ihakvvsmzcnncgfdd2ikmki7s22i9c6layzdwavbwf1";
|
sha256 = "0xgs4mmr0480c269wx9xkk67ikjzxkh8xcssrdx0f5xcl1lyd333";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
name = "fix-strncat-build-failure.patch";
|
||||||
|
url = "https://github.com/OpenZWave/open-zwave/commit/601e5fb16232a7984885e67fdddaf5b9c9dd8105.patch";
|
||||||
|
sha256 = "1n1k5arwk1dyc12xz6xl4n8yw28vghzhv27j65z1nca4zqsxgza1";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
name = "fix-text-uninitialized.patch";
|
||||||
|
url = "https://github.com/OpenZWave/open-zwave/commit/3b029a467e83bc7f0054e4dbba1e77e6eac7bc7f.patch";
|
||||||
|
sha256 = "183mrzjh1zx2b2wzkj4jisiw8br7g7bbs167afls4li0fm01d638";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
outputs = [ "out" "doc" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkg-config which ];
|
nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkg-config which ];
|
||||||
|
|
||||||
buildInputs = [ systemd ];
|
buildInputs = [ systemd ];
|
||||||
@ -26,13 +36,9 @@ in stdenv.mkDerivation {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
installPhase = ''
|
makeFlags = [
|
||||||
runHook preInstall
|
"PREFIX=${placeholder "out"}"
|
||||||
|
];
|
||||||
DESTDIR=$out PREFIX= pkgconfigdir=lib/pkgconfig make install $installFlags
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
FONTCONFIG_FILE="${fontconfig.out}/etc/fonts/fonts.conf";
|
FONTCONFIG_FILE="${fontconfig.out}/etc/fonts/fonts.conf";
|
||||||
FONTCONFIG_PATH="${fontconfig.out}/etc/fonts/";
|
FONTCONFIG_PATH="${fontconfig.out}/etc/fonts/";
|
||||||
@ -42,15 +48,6 @@ in stdenv.mkDerivation {
|
|||||||
--replace /etc/openzwave $out/etc/openzwave
|
--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=${pkg-config} pcfile=$out
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "C++ library to control Z-Wave Networks via a USB Z-Wave Controller";
|
description = "C++ library to control Z-Wave Networks via a USB Z-Wave Controller";
|
||||||
homepage = "http://www.openzwave.net/";
|
homepage = "http://www.openzwave.net/";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user