From 8b42f4f092e66280d50d1179c239df33fb83a230 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 7 Feb 2021 03:22:17 +0100 Subject: [PATCH] python3Packages.helper: enable tests, add pythonImportsCheck --- .../python-modules/helper/default.nix | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/helper/default.nix b/pkgs/development/python-modules/helper/default.nix index b5109c0def20..1697c7270397 100644 --- a/pkgs/development/python-modules/helper/default.nix +++ b/pkgs/development/python-modules/helper/default.nix @@ -1,19 +1,35 @@ -{ lib, buildPythonPackage, fetchPypi, pyyaml, mock }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pyyaml +, pytestCheckHook +, mock +}: buildPythonPackage rec { pname = "helper"; version = "2.5.0"; - src = fetchPypi { - inherit pname version; - sha256 = "4af39471d25c8820f505bc5c5b1447878bdbec0781c60d73d9ffbdf5383152b4"; + src = fetchFromGitHub { + owner = "gmr"; + repo = pname; + rev = version; + sha256 = "0zypjv8rncvrsgl200v7d3bn08gs48dwqvgamfqv71h07cj6zngp"; }; - checkInputs = [ mock ]; - propagatedBuildInputs = [ pyyaml ]; + propagatedBuildInputs = [ + pyyaml + ]; - # No tests in the pypi tarball - doCheck = false; + checkInputs = [ + pytestCheckHook + mock + ]; + + pythonImportsCheck = [ + "helper" + "helper.config" + ]; meta = with lib; { description = "Development library for quickly writing configurable applications and daemons";