1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytest,
7 pytest-xdist,
8 invoke,
9}:
10
11buildPythonPackage rec {
12 pname = "syrupy";
13 version = "4.9.1";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "syrupy-project";
18 repo = "syrupy";
19 tag = "v${version}";
20 hash = "sha256-AK4cB7MiL52oRUV6ArNj94srMsEpk/YQdjJ5tnjrAYM=";
21 };
22
23 build-system = [ poetry-core ];
24
25 buildInputs = [ pytest ];
26
27 nativeCheckInputs = [
28 invoke
29 pytest
30 pytest-xdist
31 ];
32
33 checkPhase = ''
34 runHook preCheck
35 # https://github.com/tophat/syrupy/blob/main/CONTRIBUTING.md#local-development
36 invoke test
37 runHook postCheck
38 '';
39
40 pythonImportsCheck = [ "syrupy" ];
41
42 meta = {
43 changelog = "https://github.com/syrupy-project/syrupy/blob/${src.tag}/CHANGELOG.md";
44 description = "Pytest Snapshot Test Utility";
45 homepage = "https://github.com/syrupy-project/syrupy";
46 license = lib.licenses.asl20;
47 maintainers = with lib.maintainers; [ dotlambda ];
48 };
49}