From b36764fcbe644bf1aedd3857db0e940d2a8503e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 23 May 2021 18:24:10 +0200 Subject: [PATCH 1/5] python3Packages.commentjson: init at 0.9.0 --- .../python-modules/commentjson/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/commentjson/default.nix diff --git a/pkgs/development/python-modules/commentjson/default.nix b/pkgs/development/python-modules/commentjson/default.nix new file mode 100644 index 000000000000..2aefb51d481e --- /dev/null +++ b/pkgs/development/python-modules/commentjson/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 38ab293c872d..47044eb97640 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1519,6 +1519,8 @@ in { commandparse = callPackage ../development/python-modules/commandparse { }; + commentjson = callPackage ../development/python-modules/commentjson { }; + commoncode = callPackage ../development/python-modules/commoncode { }; CommonMark = callPackage ../development/python-modules/commonmark { }; From 23414c5026bd1a2c612786053aa7c5a21b26378f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 17 May 2021 23:01:26 +0200 Subject: [PATCH 2/5] python3Packages.resolvelib: init at 0.7.0 --- .../python-modules/resolvelib/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/resolvelib/default.nix diff --git a/pkgs/development/python-modules/resolvelib/default.nix b/pkgs/development/python-modules/resolvelib/default.nix new file mode 100644 index 000000000000..db3ecbcc86e6 --- /dev/null +++ b/pkgs/development/python-modules/resolvelib/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 47044eb97640..6e02706d2480 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7206,6 +7206,8 @@ in { resampy = callPackage ../development/python-modules/resampy { }; + resolvelib = callPackage ../development/python-modules/resolvelib { }; + responses = callPackage ../development/python-modules/responses { }; respx = callPackage ../development/python-modules/respx { }; From 8e390750e320741c54aeb41aa239ae5ac108687f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 17 May 2021 23:01:41 +0200 Subject: [PATCH 3/5] python3Packages.ansible-core: init at 2.11.0 --- .../python-modules/ansible/core.nix | 83 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 85 insertions(+) create mode 100644 pkgs/development/python-modules/ansible/core.nix diff --git a/pkgs/development/python-modules/ansible/core.nix b/pkgs/development/python-modules/ansible/core.nix new file mode 100644 index 000000000000..690d5a1725d4 --- /dev/null +++ b/pkgs/development/python-modules/ansible/core.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6e02706d2480..ca9cd14d36de 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -417,6 +417,8 @@ in { 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-lint = callPackage ../development/python-modules/ansible-lint { }; From 400d5d938c51036c017c33190839ae9866aa4802 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 17 May 2021 23:03:13 +0200 Subject: [PATCH 4/5] ansible: 2.10.9 -> 2.11.0 --- pkgs/tools/admin/ansible/default.nix | 4 +++- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/ansible/default.nix b/pkgs/tools/admin/ansible/default.nix index 63ef76469599..4c66bda06f73 100644 --- a/pkgs/tools/admin/ansible/default.nix +++ b/pkgs/tools/admin/ansible/default.nix @@ -1,7 +1,9 @@ { python3Packages, fetchurl, fetchFromGitHub }: 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; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2fdd3f31b8c4..9fe272c47982 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12586,7 +12586,8 @@ in ansible ansible_2_8 ansible_2_9 - ansible_2_10; + ansible_2_10 + ansible_2_11; ansible-lint = with python3.pkgs; toPythonApplication ansible-lint; From fa71a242151cd6f95e64c34a16e8a4cbeb6c0c7c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 17 May 2021 23:15:12 +0200 Subject: [PATCH 5/5] python3Packages.ttp: 0.6.0 -> 0.7.0 --- pkgs/development/python-modules/ttp/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/ttp/default.nix b/pkgs/development/python-modules/ttp/default.nix index 1ebad5322005..4d43170cbf9a 100644 --- a/pkgs/development/python-modules/ttp/default.nix +++ b/pkgs/development/python-modules/ttp/default.nix @@ -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" ];