Merge pull request #123411 from mweinelt/ansible-2.11

This commit is contained in:
Sandro 2021-05-27 05:39:40 +02:00 committed by GitHub
commit 46fab2bfee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 163 additions and 4 deletions

View File

@ -0,0 +1,83 @@
{ lib
, buildPythonPackage
, fetchPypi
, installShellFiles
, ansible-collections
, cryptography
, jinja2
, junit-xml
, lxml
, ncclient
, packaging
, paramiko
, pexpect
, psutil
, pycrypto
, pyyaml
, requests
, resolvelib
, scp
, windowsSupport ? false, pywinrm
, xmltodict
}:
buildPythonPackage rec {
pname = "ansible-core";
version = "2.11.0";
src = fetchPypi {
inherit pname version;
sha256 = "1if9cybdicjhrfzi6nndqakb4sh3mw1fijhvbzbsq7ki22vwww4l";
};
# 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," "["
substituteInPlace requirements.txt \
--replace "resolvelib >= 0.5.3, < 0.6.0" "resolvelib"
'';
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;
meta = with lib; {
description = "Radically simple IT automation";
homepage = "https://www.ansible.com";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ hexa ];
};
}

View File

@ -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 ];
};
}

View File

@ -0,0 +1,30 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, commentjson
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "resolvelib";
version = "0.7.0";
src = fetchFromGitHub {
owner = "sarugaku";
repo = "resolvelib";
rev = version;
sha256 = "0r7cxwrfvpqz4kd7pdf8fsynzlmi6c754jd5hzd6vssc1zlyvvhx";
};
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 ];
};
}

View File

@ -19,14 +19,14 @@ let
in in
buildPythonPackage rec { buildPythonPackage rec {
pname = "ttp"; pname = "ttp";
version = "0.6.0"; version = "0.7.0";
format = "setuptools"; format = "setuptools";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "dmulyalin"; owner = "dmulyalin";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "08pglwmnhdrsj9rgys1zclhq1h597izb0jq7waahpdabfg25v2sw"; sha256 = "0gv1hykbxx3wy195xynqi21rxzlh4701qw01s6pmf3x54w63fz42";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
@ -76,6 +76,9 @@ buildPythonPackage rec {
"test_include_attribute_with_yaml_loader" "test_include_attribute_with_yaml_loader"
# TypeError: string indices must be integers # TypeError: string indices must be integers
"test_lookup_include_yaml" "test_lookup_include_yaml"
# Missing .xslx files *shrug*
"test_excel_formatter_update"
"test_excel_formatter_update_using_result_kwargs"
# missing package n2g # missing package n2g
"test_n2g_formatter" "test_n2g_formatter"
]; ];

View File

@ -1,7 +1,9 @@
{ python3Packages, fetchurl, fetchFromGitHub }: { python3Packages, fetchurl, fetchFromGitHub }:
rec { rec {
ansible = ansible_2_10; ansible = ansible_2_11;
ansible_2_11 = python3Packages.toPythonApplication python3Packages.ansible-core;
ansible_2_10 = python3Packages.toPythonApplication python3Packages.ansible-base; ansible_2_10 = python3Packages.toPythonApplication python3Packages.ansible-base;

View File

@ -12611,7 +12611,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;

View File

@ -419,6 +419,8 @@ in {
ansible-collections = callPackage ../development/python-modules/ansible/collections.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 { };
ansible-lint = callPackage ../development/python-modules/ansible-lint { }; ansible-lint = callPackage ../development/python-modules/ansible-lint { };
@ -1521,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 { };
@ -7212,6 +7216,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 { };