2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python,
|
|
|
|
poetry-core,
|
|
|
|
pytest,
|
|
|
|
invoke,
|
2023-01-20 10:41:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "syrupy";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "4.7.1";
|
|
|
|
pyproject = true;
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabled = lib.versionOlder python.version "3.8.1";
|
2023-03-04 12:14:45 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
src = fetchFromGitHub {
|
2024-09-19 14:19:46 +00:00
|
|
|
owner = "syrupy-project";
|
2023-01-20 10:41:00 +00:00
|
|
|
repo = "syrupy";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-dTUugNqzaMuKV6ZwxRSf9df7tsnmZUBhgqwgGxBhirw=";
|
2023-01-20 10:41:00 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ poetry-core ];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ pytest ];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-03-04 12:14:45 +00:00
|
|
|
invoke
|
|
|
|
pytest
|
2023-01-20 10:41:00 +00:00
|
|
|
];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
# https://github.com/tophat/syrupy/blob/main/CONTRIBUTING.md#local-development
|
|
|
|
invoke test
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
pythonImportsCheck = [ "syrupy" ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/syrupy-project/syrupy/blob/${src.rev}/CHANGELOG.md";
|
2023-01-20 10:41:00 +00:00
|
|
|
description = "Pytest Snapshot Test Utility";
|
2024-09-19 14:19:46 +00:00
|
|
|
homepage = "https://github.com/syrupy-project/syrupy";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
2023-01-20 10:41:00 +00:00
|
|
|
};
|
|
|
|
}
|