Martin Weinelt 2023-02-21 03:09:20 +01:00
parent cbf6d89a82
commit fc31b4f09a
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -1,22 +1,25 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, pythonOlder
, poetry-core , poetry-core
, pytest , pytest
, colored , colored
, pytestCheckHook , invoke
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "syrupy"; pname = "syrupy";
version = "3.0.6"; version = "4.0.1";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.8.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "tophat"; owner = "tophat";
repo = "syrupy"; repo = "syrupy";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-8DdPgah1cWVY9YZT78otlAv7X00iwxfi+Fkn3OmLgeM="; hash = "sha256-BL1Z1hPMwU1duAZb3ZTWWKS/XGv8RJ6/4YoBhktd5NE=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -32,9 +35,17 @@ buildPythonPackage rec {
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook invoke
pytest
]; ];
checkPhase = ''
runHook preCheck
# https://github.com/tophat/syrupy/blob/main/CONTRIBUTING.md#local-development
invoke test
runHook postCheck
'';
meta = with lib; { meta = with lib; {
changelog = "https://github.com/tophat/syrupy/releases/tag/v${version}"; changelog = "https://github.com/tophat/syrupy/releases/tag/v${version}";
description = "Pytest Snapshot Test Utility"; description = "Pytest Snapshot Test Utility";