From d134462b745bd415ae2ae6c208983c702fbb6423 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 16 Feb 2021 08:09:34 +0100 Subject: [PATCH] python3Packages.ConfigArgParse: enable tests --- .../python-modules/configargparse/default.nix | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/configargparse/default.nix b/pkgs/development/python-modules/configargparse/default.nix index 56b2f95465cb..9b6e5da6263e 100644 --- a/pkgs/development/python-modules/configargparse/default.nix +++ b/pkgs/development/python-modules/configargparse/default.nix @@ -1,20 +1,31 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, mock +, pytestCheckHook +}: buildPythonPackage rec { pname = "ConfigArgParse"; version = "1.3"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-BCi5datsSLsQHMtzLhtcthYpbigmjgMqqAbzK2R6HME="; + src = fetchFromGitHub { + owner = "bw2"; + repo = pname; + rev = version; + sha256 = "147x781lgahn9r3gbhayhx1pf0iysf7q1hnr3kypy3p2k9v7a9mh"; }; - # no tests in tarball - doCheck = false; + checkInputs = [ + mock + pytestCheckHook + ]; + + pythonImportsCheck = [ "configargparse" ]; meta = with lib; { description = "A drop-in replacement for argparse"; - homepage = "https://github.com/zorro3/ConfigArgParse"; + homepage = "https://github.com/bw2/ConfigArgParse"; license = licenses.mit; maintainers = [ maintainers.willibutz ]; };