biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / admin / ansible / later.nix
blobdadd182d8ce2d629f374476f0251e6c06a59b20a
1 { lib
2 , fetchFromGitHub
3 , fetchpatch
4 , python3
5 }:
7 python3.pkgs.buildPythonApplication rec {
8   pname = "ansible-later";
9   version = "3.3.1";
10   format = "pyproject";
12   src = fetchFromGitHub {
13     owner = "thegeeklab";
14     repo = pname;
15     rev = "refs/tags/v${version}";
16     hash = "sha256-7k81eEcM+BXNrln6+Lu0+1LjsZdYkUidrRQCdlBbQB8=";
17   };
19   patches = [
20     # https://github.com/thegeeklab/ansible-later/pull/658
21     (fetchpatch {
22       name = "poetry-dynamic-versioning-pep517.patch";
23       url = "https://github.com/thegeeklab/ansible-later/commit/a2c278fb45769648df1439df5bb25883dddfc58a.patch";
24       hash = "sha256-++CiwwHZoaPC8XHaYbNQeU3zqEi2a4eIYbuSQkO0jTI=";
25     })
26   ];
28   pythonRelaxDeps = [
29     "anyconfig"
30     "flake8"
31     "jsonschema"
32     "pathspec"
33     "python-json-logger"
34     "PyYAML"
35     "toolz"
36     "unidiff"
37     "yamllint"
38   ];
40   nativeBuildInputs = with python3.pkgs; [
41     poetry-core
42     poetry-dynamic-versioning
43   ];
45   propagatedBuildInputs = with python3.pkgs; [
46     ansible
47     ansible-core
48     anyconfig
49     appdirs
50     colorama
51     flake8
52     jsonschema
53     nested-lookup
54     pathspec
55     python-json-logger
56     pyyaml
57     toolz
58     unidiff
59     yamllint
60     distutils
61   ];
63   nativeCheckInputs = with python3.pkgs; [
64     pytest-cov-stub
65     pytest-mock
66     pytestCheckHook
67   ];
69   postInstall = ''
70     rm $out/lib/python*/site-packages/LICENSE
71   '';
73   pythonImportsCheck = [
74     "ansiblelater"
75   ];
77   meta = with lib; {
78     description = "Best practice scanner for Ansible roles and playbooks";
79     mainProgram = "ansible-later";
80     homepage = "https://github.com/thegeeklab/ansible-later";
81     changelog = "https://github.com/thegeeklab/ansible-later/releases/tag/v${version}";
82     license = licenses.mit;
83     maintainers = with maintainers; [ tboerger ];
84   };