ansible-lint: Remove from python-modules
This is an application, not a library. https://ansible-lint.readthedocs.io/usage/
This commit is contained in:
parent
b0a4b58495
commit
4a98f3a900
4 changed files with 10 additions and 30 deletions
|
@ -1,33 +1,14 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, python3
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, setuptools
|
, ansible
|
||||||
, setuptools-scm
|
|
||||||
, ansible-core
|
|
||||||
, black
|
|
||||||
, filelock
|
|
||||||
, flaky
|
|
||||||
, jsonschema
|
|
||||||
, packaging
|
|
||||||
, pythonOlder
|
|
||||||
, pytest-xdist
|
|
||||||
, pytestCheckHook
|
|
||||||
, pythonRelaxDepsHook
|
|
||||||
, pyyaml
|
|
||||||
, rich
|
|
||||||
, ruamel-yaml
|
|
||||||
, subprocess-tee
|
|
||||||
, wcmatch
|
|
||||||
, yamllint
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "ansible-lint";
|
pname = "ansible-lint";
|
||||||
version = "6.16.0";
|
version = "6.16.0";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
disabled = pythonOlder "3.8";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-34Lzk18SCeMHRAjurl6DfM7G/VLB0xJmif9BJKuwpcs=";
|
hash = "sha256-34Lzk18SCeMHRAjurl6DfM7G/VLB0xJmif9BJKuwpcs=";
|
||||||
|
@ -39,7 +20,7 @@ buildPythonPackage rec {
|
||||||
--replace "sys.exit(1)" ""
|
--replace "sys.exit(1)" ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = with python3.pkgs; [
|
||||||
setuptools
|
setuptools
|
||||||
setuptools-scm
|
setuptools-scm
|
||||||
pythonRelaxDepsHook
|
pythonRelaxDepsHook
|
||||||
|
@ -49,7 +30,7 @@ buildPythonPackage rec {
|
||||||
"ruamel.yaml"
|
"ruamel.yaml"
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
# https://github.com/ansible/ansible-lint/blob/master/.config/requirements.in
|
# https://github.com/ansible/ansible-lint/blob/master/.config/requirements.in
|
||||||
ansible-core
|
ansible-core
|
||||||
black
|
black
|
||||||
|
@ -67,7 +48,7 @@ buildPythonPackage rec {
|
||||||
# tests can't be easily run without installing things from ansible-galaxy
|
# tests can't be easily run without installing things from ansible-galaxy
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = with python3.pkgs; [
|
||||||
flaky
|
flaky
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
|
@ -76,7 +57,7 @@ buildPythonPackage rec {
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
# ansible wants to write to $HOME and crashes if it can't
|
# ansible wants to write to $HOME and crashes if it can't
|
||||||
export HOME=$(mktemp -d)
|
export HOME=$(mktemp -d)
|
||||||
export PATH=$PATH:${lib.makeBinPath [ ansible-core ]}
|
export PATH=$PATH:${lib.makeBinPath [ ansible ]}
|
||||||
|
|
||||||
# create a working ansible-lint executable
|
# create a working ansible-lint executable
|
||||||
export PATH=$PATH:$PWD/src/ansiblelint
|
export PATH=$PATH:$PWD/src/ansiblelint
|
||||||
|
@ -102,7 +83,7 @@ buildPythonPackage rec {
|
||||||
"test_discover_lintables_umlaut"
|
"test_discover_lintables_umlaut"
|
||||||
];
|
];
|
||||||
|
|
||||||
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ansible-core ]}" ];
|
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ ansible ]}" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Best practices checker for Ansible";
|
description = "Best practices checker for Ansible";
|
|
@ -17567,7 +17567,7 @@ with pkgs;
|
||||||
|
|
||||||
ansible-later = with python3.pkgs; toPythonApplication ansible-later;
|
ansible-later = with python3.pkgs; toPythonApplication ansible-later;
|
||||||
|
|
||||||
ansible-lint = with python3.pkgs; toPythonApplication ansible-lint;
|
ansible-lint = callPackage ../tools/admin/ansible/lint.nix { };
|
||||||
|
|
||||||
antlr2 = callPackage ../development/tools/parsing/antlr/2.7.7.nix { };
|
antlr2 = callPackage ../development/tools/parsing/antlr/2.7.7.nix { };
|
||||||
antlr3_4 = callPackage ../development/tools/parsing/antlr/3.4.nix { };
|
antlr3_4 = callPackage ../development/tools/parsing/antlr/3.4.nix { };
|
||||||
|
|
|
@ -36,6 +36,7 @@ mapAliases ({
|
||||||
abodepy = jaraco-abode; # added 2023-02-01
|
abodepy = jaraco-abode; # added 2023-02-01
|
||||||
aioh2 = throw "aioh2 has been removed because it is abandoned and broken."; # Added 2022-03-30
|
aioh2 = throw "aioh2 has been removed because it is abandoned and broken."; # Added 2022-03-30
|
||||||
ansible-base = throw "ansible-base has been removed, because it is end of life"; # added 2022-03-30
|
ansible-base = throw "ansible-base has been removed, because it is end of life"; # added 2022-03-30
|
||||||
|
ansible-lint = throw "ansible-lint has been promoted to a top-level attribute"; # Added 2023-05-16
|
||||||
anyjson = throw "anyjson has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-18
|
anyjson = throw "anyjson has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-18
|
||||||
argon2_cffi = argon2-cffi; # added 2022-05-09
|
argon2_cffi = argon2-cffi; # added 2022-05-09
|
||||||
APScheduler = apscheduler; # added 2023-02-19
|
APScheduler = apscheduler; # added 2023-02-19
|
||||||
|
|
|
@ -500,8 +500,6 @@ self: super: with self; {
|
||||||
|
|
||||||
ansible-later = callPackage ../development/python-modules/ansible-later { };
|
ansible-later = callPackage ../development/python-modules/ansible-later { };
|
||||||
|
|
||||||
ansible-lint = callPackage ../development/python-modules/ansible-lint { };
|
|
||||||
|
|
||||||
ansible-runner = callPackage ../development/python-modules/ansible-runner { };
|
ansible-runner = callPackage ../development/python-modules/ansible-runner { };
|
||||||
|
|
||||||
ansi = callPackage ../development/python-modules/ansi { };
|
ansi = callPackage ../development/python-modules/ansi { };
|
||||||
|
|
Loading…
Reference in a new issue