From ecc571b84de4f109995ad5ddf45b2c65a815e5f5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 27 Apr 2022 23:55:39 +0200 Subject: [PATCH] python3Packages.dockerfile-parse: switch to pytestCheckHook --- .../dockerfile-parse/default.nix | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/dockerfile-parse/default.nix b/pkgs/development/python-modules/dockerfile-parse/default.nix index e9a31b461fd..55ff20803b2 100644 --- a/pkgs/development/python-modules/dockerfile-parse/default.nix +++ b/pkgs/development/python-modules/dockerfile-parse/default.nix @@ -1,24 +1,42 @@ -{ lib, buildPythonPackage, fetchPypi, six, pytest-cov, pytest }: +{ lib +, buildPythonPackage +, fetchPypi +, six +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { - version = "1.2.0"; pname = "dockerfile-parse"; + version = "1.2.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "07e65eec313978e877da819855870b3ae47f3fac94a40a965b9ede10484dacc5"; + hash = "sha256-B+Ze7DE5eOh32oGYVYcLOuR/P6yUpAqWW57eEEhNrMU="; }; - postPatch = '' - echo " " > tests/requirements.txt \ - ''; + propagatedBuildInputs = [ + six + ]; - propagatedBuildInputs = [ six ]; + checkInputs = [ + pytestCheckHook + ]; - checkInputs = [ pytest-cov pytest ]; + pythonImportsCheck = [ + "dockerfile_parse" + ]; + + disabledTests = [ + # python-dockerfile-parse.spec is not present + "test_all_versions_match" + ]; meta = with lib; { - description = "Python library for parsing Dockerfile files"; + description = "Library for parsing Dockerfile files"; homepage = "https://github.com/DBuildService/dockerfile-parse"; license = licenses.bsd3; maintainers = with maintainers; [ leenaars ];