nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 80 lines 1.5 kB view raw
1{ 2 lib, 3 asttokens, 4 black, 5 buildPythonPackage, 6 dirty-equals, 7 executing, 8 fetchFromGitHub, 9 freezegun, 10 hatchling, 11 hypothesis, 12 pydantic, 13 pyright, 14 pytest-freezer, 15 pytest-mock, 16 pytest-xdist, 17 pytestCheckHook, 18 pythonOlder, 19 rich, 20 time-machine, 21 toml, 22}: 23 24buildPythonPackage rec { 25 pname = "inline-snapshot"; 26 version = "0.31.1"; 27 pyproject = true; 28 29 src = fetchFromGitHub { 30 owner = "15r10nk"; 31 repo = "inline-snapshot"; 32 tag = version; 33 hash = "sha256-45e3M7WjGLhmn1Tdf7fD04jSA32TvB0QmFzvywJc3Ac="; 34 }; 35 36 build-system = [ hatchling ]; 37 38 dependencies = [ 39 asttokens 40 executing 41 rich 42 toml 43 ] 44 ++ lib.optionals (pythonOlder "3.11") [ 45 toml 46 ]; 47 48 nativeCheckInputs = [ 49 freezegun 50 hypothesis 51 pydantic 52 pyright 53 pytest-freezer 54 pytest-mock 55 pytest-xdist 56 pytestCheckHook 57 time-machine 58 ] 59 ++ lib.concatAttrValues optional-dependencies; 60 61 optional-dependencies = { 62 black = [ black ]; 63 dirty-equals = [ dirty-equals ]; 64 }; 65 66 pythonImportsCheck = [ "inline_snapshot" ]; 67 68 disabledTestPaths = [ 69 # Tests don't play nice with pytest-xdist 70 "tests/test_typing.py" 71 ]; 72 73 meta = { 74 description = "Create and update inline snapshots in Python tests"; 75 homepage = "https://github.com/15r10nk/inline-snapshot/"; 76 changelog = "https://github.com/15r10nk/inline-snapshot/blob/${src.tag}/CHANGELOG.md"; 77 license = lib.licenses.mit; 78 maintainers = with lib.maintainers; [ fab ]; 79 }; 80}