Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 80 lines 1.5 kB view raw
1{ 2 lib, 3 asttokens, 4 black, 5 buildPythonPackage, 6 click, 7 dirty-equals, 8 executing, 9 fetchFromGitHub, 10 hatchling, 11 hypothesis, 12 pydantic, 13 pyright, 14 pytest-subtests, 15 pytest-xdist, 16 pytestCheckHook, 17 pythonOlder, 18 rich, 19 time-machine, 20 toml, 21 types-toml, 22 typing-extensions, 23}: 24 25buildPythonPackage rec { 26 pname = "inline-snapshot"; 27 version = "0.13.3"; 28 pyproject = true; 29 30 disabled = pythonOlder "3.10"; 31 32 src = fetchFromGitHub { 33 owner = "15r10nk"; 34 repo = "inline-snapshot"; 35 rev = "refs/tags/v${version}"; 36 hash = "sha256-hwt/EFYedrml0x58Rd1AjqrIlELAXp1ku8v7glhCebE="; 37 }; 38 39 build-system = [ hatchling ]; 40 41 dependencies = 42 [ 43 asttokens 44 black 45 click 46 executing 47 rich 48 typing-extensions 49 ] 50 ++ lib.optionals (pythonOlder "3.11") [ 51 types-toml 52 toml 53 ]; 54 55 nativeCheckInputs = [ 56 dirty-equals 57 hypothesis 58 pydantic 59 pyright 60 pytest-subtests 61 pytest-xdist 62 pytestCheckHook 63 time-machine 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 = with lib; { 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/${version}/CHANGELOG.md"; 77 license = licenses.mit; 78 maintainers = with maintainers; [ fab ]; 79 }; 80}