nixpkgs/pkgs/development/python-modules/syrupy/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.0 KiB
Nix
Raw Normal View History

2023-01-03 14:42:48 +00:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
2023-01-03 14:42:48 +00:00
, poetry-core
, pytest
, colored
, invoke
2023-01-03 14:42:48 +00:00
}:
buildPythonPackage rec {
pname = "syrupy";
version = "4.0.1";
2023-01-03 14:42:48 +00:00
format = "pyproject";
disabled = pythonOlder "3.8.1";
2023-01-03 14:42:48 +00:00
src = fetchFromGitHub {
owner = "tophat";
repo = "syrupy";
rev = "refs/tags/v${version}";
hash = "sha256-BL1Z1hPMwU1duAZb3ZTWWKS/XGv8RJ6/4YoBhktd5NE=";
2023-01-03 14:42:48 +00:00
};
nativeBuildInputs = [
poetry-core
];
buildInputs = [
pytest
];
propagatedBuildInputs = [
colored
];
nativeCheckInputs = [
invoke
pytest
2023-01-03 14:42:48 +00:00
];
checkPhase = ''
runHook preCheck
# https://github.com/tophat/syrupy/blob/main/CONTRIBUTING.md#local-development
invoke test
runHook postCheck
'';
2023-01-03 14:42:48 +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; [ ];
};
}