From e0fc3b5fa1702d37f38766073fa80f1789d11e4f Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sat, 7 Apr 2018 20:11:56 +0200 Subject: [PATCH] openzwave: Init at 2018-04-04 --- .../libraries/openzwave/default.nix | 56 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/libraries/openzwave/default.nix diff --git a/pkgs/development/libraries/openzwave/default.nix b/pkgs/development/libraries/openzwave/default.nix new file mode 100644 index 000000000000..63c51996b227 --- /dev/null +++ b/pkgs/development/libraries/openzwave/default.nix @@ -0,0 +1,56 @@ +{ stdenv, fetchFromGitHub +, doxygen, fontconfig, graphviz-nox, libxml2, pkgconfig, which +, systemd }: + +let + version = "2018-04-04"; + +in stdenv.mkDerivation rec { + name = "openzwave-${version}"; + + src = fetchFromGitHub { + owner = "OpenZWave"; + repo = "open-zwave"; + rev = "ab5fe966fee882bb9e8d78a91db892a60a1863d9"; + sha256 = "0yby8ygzjn5zp5vhysxaadbzysqanwd2zakz379299qs454pr2h9"; + }; + + nativeBuildInputs = [ doxygen fontconfig graphviz-nox libxml2 pkgconfig which ]; + + buildInputs = [ systemd ]; + + 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"; + homepage = http://www.openzwave.net/; + license = licenses.gpl3; + maintainers = with maintainers; [ etu ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1480b906403b..3195410c3c11 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20532,6 +20532,8 @@ with pkgs; moltengamepad = callPackage ../misc/drivers/moltengamepad { }; + openzwave = callPackage ../development/libraries/openzwave { }; + mongoc = callPackage ../development/libraries/mongoc { }; mupen64plus = callPackage ../misc/emulators/mupen64plus { };