From f5148df5a65b3d7f00f196c8da7d06a0c486b65d Mon Sep 17 00:00:00 2001 From: Jocelyn Thode Date: Sun, 17 Jul 2022 22:20:15 +0200 Subject: [PATCH] taxi: add tests and remove application/backends --- .../python-modules/taxi/default.nix | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/taxi/default.nix b/pkgs/development/python-modules/taxi/default.nix index a0ccf0167cf8..28aa01e904a1 100644 --- a/pkgs/development/python-modules/taxi/default.nix +++ b/pkgs/development/python-modules/taxi/default.nix @@ -1,32 +1,38 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , appdirs , requests , click , setuptools -, backends ? [ ] +, pytestCheckHook +, freezegun }: buildPythonPackage rec { pname = "taxi"; version = "6.1.1"; - src = fetchPypi { - inherit version; - pname = "taxi"; - sha256 = "b2562ed58bd6eae7896f4f8e48dbee9845cd2d452b26dd15c26f839b4864cb02"; + src = fetchFromGitHub { + owner = "sephii"; + repo = "taxi"; + rev = version; + sha256 = "sha256-iIy3odDX3QzVG80AFp81m8AYKES4JjlDp49GGpuIHLI="; }; - # No tests in pypy package - doCheck = false; - propagatedBuildInputs = [ appdirs requests click setuptools - ] ++ backends; + ]; + + checkInputs = [ + freezegun + pytestCheckHook + ]; + + pythonImportsCheck = [ "taxi" ]; meta = with lib; { homepage = "https://github.com/sephii/taxi/";