2023-01-20 10:41:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, python
|
2023-01-20 10:41:00 +00:00
|
|
|
, poetry-core
|
|
|
|
, pytest
|
|
|
|
, colored
|
2023-03-04 12:14:45 +00:00
|
|
|
, invoke
|
2023-01-20 10:41:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "syrupy";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "4.5.0";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
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 {
|
|
|
|
owner = "tophat";
|
|
|
|
repo = "syrupy";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-HRCURqnFzo1l+PjX1LtXTSVZGA36OaRgmy4xKizeuOg=";
|
2023-01-20 10:41:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
colored
|
|
|
|
];
|
|
|
|
|
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" ];
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
meta = with lib; {
|
|
|
|
changelog = "https://github.com/tophat/syrupy/releases/tag/v${version}";
|
|
|
|
description = "Pytest Snapshot Test Utility";
|
|
|
|
homepage = "https://github.com/tophat/syrupy";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|