Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhoeg committed Mar 12, 2018
1 parent cc4677c commit 1c4825e
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
42 changes: 42 additions & 0 deletions pkgs/development/libraries/openzwave/default.nix
@@ -0,0 +1,42 @@
{ stdenv, fetchFromGitHub, doxygen, pkgconfig, tree
, udev }:

stdenv.mkDerivation rec {
name = "openzwave-${version}";
version = "1.5";

src = fetchFromGitHub {
owner = "OpenZWave";
repo = "open-zwave";
rev = "V${version}";
sha256 = "0fbffhm9yaj6w0p9agdqv95808cai2744ckryzhlwk31vznn51si";
};

buildInputs = [ udev ];

nativeBuildInputs = [ doxygen pkgconfig tree ];

enableParallelBuilding = true;

preBuild = ''
export DESTDIR=$out
export PREFIX=./
'';

# We don't just force-remove in case a new version leaves other stuff behind
# that we need to move out of the way
postInstall = ''
mv $out/usr/lib/pkgconfig $out/lib/
rmdir $out/usr{/lib,}
substituteInPlace $out/bin/ozw_config \
--replace /usr/lib $out/lib
'';

meta = with stdenv.lib; {
description = "C++ library to control Z-Wave Networks via a USB Z-Wave Controller";
homepage = https://www.openzwave.net;
license = licenses.gpl3;
maintainers = with maintainers; [ peterhoeg ];
};
}
23 changes: 23 additions & 0 deletions pkgs/development/python-modules/openzwave/default.nix
@@ -0,0 +1,23 @@
{ stdenv, buildPythonPackage, fetchPypi, pkgconfig, libopenzwave, cython, six }:

buildPythonPackage rec {
pname = "python_openzwave";
version = "0.4.4";

src = fetchPypi {
inherit pname version;
extension = "zip";
sha256 = "17wdgwg212agj1gxb2kih4cvhjb5bprir4x446s8qwx0mz03azk2";
};

buildInputs = [ libopenzwave ];

nativeBuildInputs = [ pkgconfig ];

propagatedBuildInputs = [ cython six ];

meta = with stdenv.lib; {
description = "Python wrapper for openzwave";
inherit (libopenzwave.meta) homepage license maintainers;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -10744,6 +10744,8 @@ with pkgs;

openwsman = callPackage ../development/libraries/openwsman {};

libopenzwave = callPackage ../development/libraries/openzwave {};

ortp = callPackage ../development/libraries/ortp { };

openrct2 = callPackage ../games/openrct2/default.nix { };
Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/python-packages.nix
Expand Up @@ -2801,6 +2801,7 @@ in {

openidc-client = callPackage ../development/python-modules/openidc-client/default.nix {};

python_openzwave = callPackage ../development/python-modules/openzwave {};

idna = callPackage ../development/python-modules/idna { };

Expand Down

0 comments on commit 1c4825e

Please sign in to comment.