Merge pull request #138355 from mweinelt/21.05/ansible
This commit is contained in:
commit
60f651c276
|
@ -1,8 +1,8 @@
|
||||||
{ lib
|
{ lib
|
||||||
|
, callPackage
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, ansible-collections
|
|
||||||
, cryptography
|
, cryptography
|
||||||
, jinja2
|
, jinja2
|
||||||
, junit-xml
|
, junit-xml
|
||||||
|
@ -20,13 +20,19 @@
|
||||||
, xmltodict
|
, xmltodict
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
ansible-collections = callPackage ./collections.nix {
|
||||||
|
version = "3.4.0"; # must be < 4.0
|
||||||
|
sha256 = "096rbgz730njk0pg8qnc27mmz110wqrw354ca9gasb7rqg0f4d6a";
|
||||||
|
};
|
||||||
|
in
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ansible-base";
|
pname = "ansible-base";
|
||||||
version = "2.10.11";
|
version = "2.10.14";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "0jr3cxqiami9k07g2kmvfp54iafbcnd1d66l8fdnaqka5bc19wdw";
|
sha256 = "sha256-gAxGRsWKWJf3HyIwFn21YmoZbeuiCPDvRWChg//Z39o=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# ansible_connection is already wrapped, so don't pass it through
|
# ansible_connection is already wrapped, so don't pass it through
|
||||||
|
@ -69,6 +75,10 @@ buildPythonPackage rec {
|
||||||
# internal import errors, missing dependencies
|
# internal import errors, missing dependencies
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
collections = ansible-collections;
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Radically simple IT automation";
|
description = "Radically simple IT automation";
|
||||||
homepage = "https://www.ansible.com";
|
homepage = "https://www.ansible.com";
|
||||||
|
|
|
@ -14,21 +14,23 @@
|
||||||
, xmltodict
|
, xmltodict
|
||||||
, withJunos ? false
|
, withJunos ? false
|
||||||
, withNetbox ? false
|
, withNetbox ? false
|
||||||
|
|
||||||
|
, version
|
||||||
|
, sha256
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ansible";
|
pname = "ansible";
|
||||||
version = "3.4.0";
|
inherit version;
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version sha256;
|
||||||
sha256 = "096rbgz730njk0pg8qnc27mmz110wqrw354ca9gasb7rqg0f4d6a";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# make ansible-base depend on ansible-collection, not the other way around
|
# make ansible-base depend on ansible-collection, not the other way around
|
||||||
sed -i '/ansible-base/d' setup.py
|
sed -Ei '/ansible-(base|core)/d' setup.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = lib.unique ([
|
propagatedBuildInputs = lib.unique ([
|
||||||
|
@ -70,7 +72,7 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Radically simple IT automation";
|
description = "Radically simple IT automation";
|
||||||
homepage = "http://www.ansible.com";
|
homepage = "https://www.ansible.com";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
maintainers = with maintainers; [ hexa ];
|
maintainers = with maintainers; [ hexa ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
{ lib
|
||||||
|
, callPackage
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, installShellFiles
|
||||||
|
, cryptography
|
||||||
|
, jinja2
|
||||||
|
, junit-xml
|
||||||
|
, lxml
|
||||||
|
, ncclient
|
||||||
|
, packaging
|
||||||
|
, paramiko
|
||||||
|
, pexpect
|
||||||
|
, psutil
|
||||||
|
, pycrypto
|
||||||
|
, pyyaml
|
||||||
|
, requests
|
||||||
|
, resolvelib
|
||||||
|
, scp
|
||||||
|
, windowsSupport ? false, pywinrm
|
||||||
|
, xmltodict
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
ansible-collections = callPackage ./collections.nix {
|
||||||
|
version = "4.5.0";
|
||||||
|
sha256 = "1c8dspqy4in7sgz10y1pggwnh1hv79wap7p7xhai0f0s6nr54lyc";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "ansible-core";
|
||||||
|
version = "2.11.5";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "sha256-fTzkcBQSKQdFRwQ2NIXkhRP4rQ8AE4uIhw622IlT0SE=";
|
||||||
|
};
|
||||||
|
|
||||||
|
# ansible_connection is already wrapped, so don't pass it through
|
||||||
|
# the python interpreter again, as it would break execution of
|
||||||
|
# connection plugins.
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace lib/ansible/executor/task_executor.py \
|
||||||
|
--replace "[python," "["
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
# depend on ansible-collections instead of the other way around
|
||||||
|
ansible-collections
|
||||||
|
# from requirements.txt
|
||||||
|
cryptography
|
||||||
|
jinja2
|
||||||
|
packaging
|
||||||
|
pyyaml
|
||||||
|
resolvelib
|
||||||
|
# optional dependencies
|
||||||
|
junit-xml
|
||||||
|
lxml
|
||||||
|
ncclient
|
||||||
|
paramiko
|
||||||
|
pexpect
|
||||||
|
psutil
|
||||||
|
pycrypto
|
||||||
|
requests
|
||||||
|
scp
|
||||||
|
xmltodict
|
||||||
|
] ++ lib.optional windowsSupport pywinrm;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
installManPage docs/man/man1/*.1
|
||||||
|
'';
|
||||||
|
|
||||||
|
# internal import errors, missing dependencies
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
collections = ansible-collections;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Radically simple IT automation";
|
||||||
|
homepage = "https://www.ansible.com";
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
maintainers = with maintainers; [ hexa ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
, fetchPypi
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, pycrypto
|
, pycrypto
|
||||||
, paramiko
|
, paramiko
|
||||||
|
@ -18,13 +18,11 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ansible";
|
pname = "ansible";
|
||||||
version = "2.9.23";
|
version = "2.9.26";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchPypi {
|
||||||
owner = "ansible";
|
inherit pname version;
|
||||||
repo = "ansible";
|
sha256 = "sha256-OuAqrSu+3PtBnOdevSpkjp3rc+ni2N6GyC1gR7G962M=";
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "0mikykpzyqpmaiczz53f71mcyc4qvahi9ckn7wgfx7sw7s2z3skk";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
|
@ -48,7 +46,7 @@ buildPythonPackage rec {
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "http://www.ansible.com";
|
homepage = "https://www.ansible.com";
|
||||||
description = "Radically simple IT automation";
|
description = "Radically simple IT automation";
|
||||||
license = [ licenses.gpl3 ] ;
|
license = [ licenses.gpl3 ] ;
|
||||||
maintainers = with maintainers; [ joamaki costrouc hexa ];
|
maintainers = with maintainers; [ joamaki costrouc hexa ];
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
{ lib, buildPythonPackage, fetchFromGitHub, six, lark-parser, pytestCheckHook }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "commentjson";
|
||||||
|
version = "0.9.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "vaidik";
|
||||||
|
repo = "commentjson";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-dPnIcv7TIeyG7rU938w7FrDklmaGuPpXz34uw/JjOgY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace "lark-parser>=0.7.1,<0.8.0" "lark-parser"
|
||||||
|
|
||||||
|
# NixOS is missing test.test_json module
|
||||||
|
rm -r commentjson/tests/test_json
|
||||||
|
'';
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ lark-parser six ];
|
||||||
|
|
||||||
|
checkInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "commentjson" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Add JavaScript or Python style comments in JSON";
|
||||||
|
homepage = "https://github.com/vaidik/commentjson/";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, commentjson
|
||||||
|
, pytestCheckHook
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "resolvelib";
|
||||||
|
# Currently this package is only used by Ansible and breaking changes
|
||||||
|
# are frequently introduced, so when upgrading ensure the new version
|
||||||
|
# is compatible with Ansible
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/128636
|
||||||
|
# https://github.com/ansible/ansible/blob/devel/requirements.txt
|
||||||
|
version = "0.5.5";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "sarugaku";
|
||||||
|
repo = "resolvelib";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "198vfv78hilpg0d0mjzchzp9zk6239wnra61vlsgwpcgz66d2bgv";
|
||||||
|
};
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
commentjson
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Resolve abstract dependencies into concrete ones";
|
||||||
|
homepage = "https://github.com/sarugaku/resolvelib";
|
||||||
|
license = licenses.isc;
|
||||||
|
maintainers = with maintainers; [ hexa ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,6 +3,8 @@
|
||||||
rec {
|
rec {
|
||||||
ansible = ansible_2_10;
|
ansible = ansible_2_10;
|
||||||
|
|
||||||
|
ansible_2_11 = python3Packages.toPythonApplication python3Packages.ansible-core;
|
||||||
|
|
||||||
ansible_2_10 = python3Packages.toPythonApplication python3Packages.ansible-base;
|
ansible_2_10 = python3Packages.toPythonApplication python3Packages.ansible-base;
|
||||||
|
|
||||||
# End of support 2021/10/02, End of life 2021/12/31
|
# End of support 2021/10/02, End of life 2021/12/31
|
||||||
|
|
|
@ -12625,7 +12625,8 @@ in
|
||||||
ansible
|
ansible
|
||||||
ansible_2_8
|
ansible_2_8
|
||||||
ansible_2_9
|
ansible_2_9
|
||||||
ansible_2_10;
|
ansible_2_10
|
||||||
|
ansible_2_11;
|
||||||
|
|
||||||
ansible-lint = with python3.pkgs; toPythonApplication ansible-lint;
|
ansible-lint = with python3.pkgs; toPythonApplication ansible-lint;
|
||||||
|
|
||||||
|
|
|
@ -415,7 +415,7 @@ in {
|
||||||
|
|
||||||
ansible-base = callPackage ../development/python-modules/ansible/base.nix { };
|
ansible-base = callPackage ../development/python-modules/ansible/base.nix { };
|
||||||
|
|
||||||
ansible-collections = callPackage ../development/python-modules/ansible/collections.nix { };
|
ansible-core = callPackage ../development/python-modules/ansible/core.nix { };
|
||||||
|
|
||||||
ansible-kernel = callPackage ../development/python-modules/ansible-kernel { };
|
ansible-kernel = callPackage ../development/python-modules/ansible-kernel { };
|
||||||
|
|
||||||
|
@ -1523,6 +1523,8 @@ in {
|
||||||
|
|
||||||
commandparse = callPackage ../development/python-modules/commandparse { };
|
commandparse = callPackage ../development/python-modules/commandparse { };
|
||||||
|
|
||||||
|
commentjson = callPackage ../development/python-modules/commentjson { };
|
||||||
|
|
||||||
commoncode = callPackage ../development/python-modules/commoncode { };
|
commoncode = callPackage ../development/python-modules/commoncode { };
|
||||||
|
|
||||||
CommonMark = callPackage ../development/python-modules/commonmark { };
|
CommonMark = callPackage ../development/python-modules/commonmark { };
|
||||||
|
@ -7206,6 +7208,8 @@ in {
|
||||||
|
|
||||||
resampy = callPackage ../development/python-modules/resampy { };
|
resampy = callPackage ../development/python-modules/resampy { };
|
||||||
|
|
||||||
|
resolvelib = callPackage ../development/python-modules/resolvelib { };
|
||||||
|
|
||||||
responses = callPackage ../development/python-modules/responses { };
|
responses = callPackage ../development/python-modules/responses { };
|
||||||
|
|
||||||
respx = callPackage ../development/python-modules/respx { };
|
respx = callPackage ../development/python-modules/respx { };
|
||||||
|
|
Loading…
Reference in New Issue