Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / syrupy / default.nix
blob84bc944317e1cecc3145da1417409d0237282f17
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , python
5 , poetry-core
6 , pytest
7 , colored
8 , invoke
9 }:
11 buildPythonPackage rec {
12   pname = "syrupy";
13   version = "4.6.0";
14   format = "pyproject";
16   disabled = lib.versionOlder python.version "3.8.1";
18   src = fetchFromGitHub {
19     owner = "tophat";
20     repo = "syrupy";
21     rev = "refs/tags/v${version}";
22     hash = "sha256-FjDGwSOKvDWx+LwUCNGEOBKV3rFG+09gtFpLLi0xgD4=";
23   };
25   nativeBuildInputs = [
26     poetry-core
27   ];
29   buildInputs = [
30     pytest
31   ];
33   propagatedBuildInputs = [
34     colored
35   ];
37   nativeCheckInputs = [
38     invoke
39     pytest
40   ];
42   checkPhase = ''
43     runHook preCheck
44     # https://github.com/tophat/syrupy/blob/main/CONTRIBUTING.md#local-development
45     invoke test
46     runHook postCheck
47   '';
49   pythonImportsCheck = [ "syrupy" ];
51   meta = with lib; {
52     changelog = "https://github.com/tophat/syrupy/releases/tag/v${version}";
53     description = "Pytest Snapshot Test Utility";
54     homepage = "https://github.com/tophat/syrupy";
55     license = licenses.asl20;
56     maintainers = with maintainers; [ ];
57   };