diff --git a/pkgs/development/python-modules/voluptuous-serialize/default.nix b/pkgs/development/python-modules/voluptuous-serialize/default.nix new file mode 100644 index 000000000000..e2796ee2a74e --- /dev/null +++ b/pkgs/development/python-modules/voluptuous-serialize/default.nix @@ -0,0 +1,35 @@ +{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, voluptuous, pytest }: + +buildPythonPackage rec { + pname = "voluptuous-serialize"; + version = "2018-03-10"; + + disabled = !isPy3k; + + # no tests in PyPI tarball + src = fetchFromGitHub { + owner = "balloob"; + repo = pname; + rev = "567f0d96f928cf6c30c9f1b8bdee729e651aac82"; + sha256 = "0b16f1bxlqyvi1hy8wmzp2k0rzqcycmdhs8zwsyx0swnvkgwnv50"; + }; + + propagatedBuildInputs = [ + voluptuous + ]; + + checkInputs = [ + pytest + ]; + + checkPhase = '' + py.test + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/balloob/voluptuous-serialize; + license = licenses.asl20; + description = "Convert Voluptuous schemas to dictionaries so they can be serialized"; + maintainers = with maintainers; [ etu ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 4d970a7e0d5d..abe57c2d57f9 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -402,7 +402,7 @@ "http.real_ip" = ps: with ps; [ ]; "http.static" = ps: with ps; [ ]; "http.view" = ps: with ps; [ ]; - "hue" = ps: with ps; [ aiohue ]; + "hue" = ps: with ps; [ aiohue voluptuous-serialize ]; "hue.bridge" = ps: with ps; [ ]; "hue.config_flow" = ps: with ps; [ ]; "hue.const" = ps: with ps; [ ]; @@ -459,7 +459,7 @@ "light.hive" = ps: with ps; [ ]; "light.homekit_controller" = ps: with ps; [ ]; "light.homematic" = ps: with ps; [ pyhomematic ]; - "light.hue" = ps: with ps; [ aiohue ]; + "light.hue" = ps: with ps; [ aiohue voluptuous-serialize ]; "light.hyperion" = ps: with ps; [ ]; "light.iglo" = ps: with ps; [ ]; "light.ihc" = ps: with ps; [ ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 031746346b9f..032cda8aa911 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18131,6 +18131,8 @@ EOF voluptuous = callPackage ../development/python-modules/voluptuous { }; + voluptuous-serialize = callPackage ../development/python-modules/voluptuous-serialize { }; + pysigset = callPackage ../development/python-modules/pysigset { }; us = callPackage ../development/python-modules/us { };