1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 poetry-core,
8 poetry-dynamic-versioning,
9
10 # dependencies
11 pytest,
12 ruff,
13
14 # tests
15 pytestCheckHook,
16 pytest-mock,
17}:
18
19buildPythonPackage rec {
20 pname = "pytest-ruff";
21 version = "0.5";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "businho";
26 repo = "pytest-ruff";
27 tag = "v${version}";
28 hash = "sha256-fwtubbTRvPMSGhylP3H5zhIwHdeWeTbvxZY5doM+tvw=";
29 };
30
31 build-system = [
32 poetry-core
33 poetry-dynamic-versioning
34 ];
35
36 dependencies = [
37 pytest
38 ruff
39 ];
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 pytest-mock
44 ];
45
46 pythonImportsCheck = [ "pytest_ruff" ];
47
48 meta = {
49 description = "Pytest plugin to run ruff";
50 homepage = "https://github.com/businho/pytest-ruff";
51 changelog = "https://github.com/businho/pytest-ruff/releases/tag/${src.tag}";
52 license = lib.licenses.mit;
53 maintainers = with lib.maintainers; [ baloo ];
54 };
55}