Files
nixpkgs/pkgs/development/python-modules/inline-snapshot/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

83 lines
1.5 KiB
Nix

{
lib,
asttokens,
black,
buildPythonPackage,
dirty-equals,
executing,
fetchFromGitHub,
freezegun,
hatchling,
hypothesis,
pydantic,
pyright,
pytest-freezer,
pytest-mock,
pytest-subtests,
pytest-xdist,
pytestCheckHook,
pythonOlder,
rich,
time-machine,
toml,
}:
buildPythonPackage rec {
pname = "inline-snapshot";
version = "0.28.0";
pyproject = true;
src = fetchFromGitHub {
owner = "15r10nk";
repo = "inline-snapshot";
tag = version;
hash = "sha256-f572H7jeolv9nONuRBtZR/pcVDs5oX/dOiEjXlJyiio=";
};
build-system = [ hatchling ];
dependencies = [
asttokens
executing
rich
toml
]
++ lib.optionals (pythonOlder "3.11") [
toml
];
nativeCheckInputs = [
freezegun
hypothesis
pydantic
pyright
pytest-freezer
pytest-mock
pytest-subtests
pytest-xdist
pytestCheckHook
time-machine
]
++ lib.concatAttrValues optional-dependencies;
optional-dependencies = {
black = [ black ];
dirty-equals = [ dirty-equals ];
};
pythonImportsCheck = [ "inline_snapshot" ];
disabledTestPaths = [
# Tests don't play nice with pytest-xdist
"tests/test_typing.py"
];
meta = {
description = "Create and update inline snapshots in Python tests";
homepage = "https://github.com/15r10nk/inline-snapshot/";
changelog = "https://github.com/15r10nk/inline-snapshot/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}