depot/third_party/nixpkgs/pkgs/development/python-modules/syrupy/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

58 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, poetry-core
, pytest
, colored
, invoke
}:
buildPythonPackage rec {
pname = "syrupy";
version = "4.5.0";
format = "pyproject";
disabled = lib.versionOlder python.version "3.8.1";
src = fetchFromGitHub {
owner = "tophat";
repo = "syrupy";
rev = "refs/tags/v${version}";
hash = "sha256-HRCURqnFzo1l+PjX1LtXTSVZGA36OaRgmy4xKizeuOg=";
};
nativeBuildInputs = [
poetry-core
];
buildInputs = [
pytest
];
propagatedBuildInputs = [
colored
];
nativeCheckInputs = [
invoke
pytest
];
checkPhase = ''
runHook preCheck
# https://github.com/tophat/syrupy/blob/main/CONTRIBUTING.md#local-development
invoke test
runHook postCheck
'';
pythonImportsCheck = [ "syrupy" ];
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; [ ];
};
}