From 9bf0304ee9f171214a1648eb0783463461393258 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 17 Jan 2021 09:56:40 +0100 Subject: [PATCH] python3Packages.voluptuous-serialize: enable tests --- .../voluptuous-serialize/default.nix | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/voluptuous-serialize/default.nix b/pkgs/development/python-modules/voluptuous-serialize/default.nix index d054a32c30e..4c31b5f758a 100644 --- a/pkgs/development/python-modules/voluptuous-serialize/default.nix +++ b/pkgs/development/python-modules/voluptuous-serialize/default.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, buildPythonPackage, isPy3k, fetchPypi, voluptuous, pytest }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy3k +, pytestCheckHook +, voluptuous +}: buildPythonPackage rec { pname = "voluptuous-serialize"; @@ -6,28 +12,24 @@ buildPythonPackage rec { disabled = !isPy3k; - src = fetchPypi { - inherit pname version; - sha256 = "1r7avibzf009h5rlh7mbh1fc01daligvi2axjn5qxh810g5igfn6"; + src = fetchFromGitHub { + owner = "home-assistant-libs"; + repo = pname; + rev = version; + sha256 = "1km2y1xaagkdvsy3bmi1sc040x5yyfdw6llmwdv9z8nz67m9v1ya"; }; - propagatedBuildInputs = [ + propagatedBuildInputs = [ voluptuous ]; + + checkInputs = [ + pytestCheckHook voluptuous ]; - checkInputs = [ - pytest - ]; - - checkPhase = '' - py.test - ''; - - # no tests in PyPI tarball - doCheck = false; + pythonImportsCheck = [ "voluptuous_serialize" ]; meta = with lib; { - homepage = "https://github.com/balloob/voluptuous-serialize"; + homepage = "https://github.com/home-assistant-libs/voluptuous-serialize"; license = licenses.asl20; description = "Convert Voluptuous schemas to dictionaries so they can be serialized"; maintainers = with maintainers; [ etu ];