Merge pull request #118391 from dotlambda/openzwave-official

openzwave: use official version
This commit is contained in:
Robert Schütz 2021-04-08 19:02:41 +02:00 committed by GitHub
commit c6bd90d48f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 29 deletions

View file

@ -1,23 +1,33 @@
{ lib, stdenv, fetchFromGitHub
{ lib, stdenv, fetchFromGitHub, fetchpatch
, doxygen, fontconfig, graphviz-nox, libxml2, pkg-config, which
, systemd }:
let
version = "2019-12-08";
in stdenv.mkDerivation {
stdenv.mkDerivation rec {
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 {
owner = "home-assistant";
owner = "OpenZWave";
repo = "open-zwave";
rev = "2cd2137025c529835e4893a7b87c3d56605b2681";
sha256 = "04g8fb4f4ihakvvsmzcnncgfdd2ikmki7s22i9c6layzdwavbwf1";
rev = "v${version}";
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 ];
buildInputs = [ systemd ];
@ -26,13 +36,9 @@ in stdenv.mkDerivation {
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
DESTDIR=$out PREFIX= pkgconfigdir=lib/pkgconfig make install $installFlags
runHook postInstall
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
];
FONTCONFIG_FILE="${fontconfig.out}/etc/fonts/fonts.conf";
FONTCONFIG_PATH="${fontconfig.out}/etc/fonts/";
@ -42,15 +48,6 @@ in stdenv.mkDerivation {
--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; {
description = "C++ library to control Z-Wave Networks via a USB Z-Wave Controller";
homepage = "http://www.openzwave.net/";

View file

@ -1,6 +1,19 @@
{ python_openzwave, fetchPypi }:
{ python_openzwave, fetchPypi, openzwave, fetchFromGitHub }:
python_openzwave.overridePythonAttrs (oldAttrs: rec {
(python_openzwave.override {
openzwave = openzwave.overrideAttrs (oldAttrs: {
version = "unstable-2020-03-24";
src = fetchFromGitHub {
owner = "home-assistant";
repo = "open-zwave";
rev = "94267fa298c1882f0dc73c0fd08f1f755ba83e83";
sha256 = "0p2869fwidz1wcqzfm52cwm9ab96pmwkna3d4yvvh21nh09cvmwk";
};
patches = [ ];
});
}).overridePythonAttrs (oldAttrs: rec {
pname = "homeassistant_pyozw";
version = "0.1.10";