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