push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,115 @@
{
lib,
buildPythonPackage,
fetchPypi,
python,
pythonOlder,
installShellFiles,
docutils,
setuptools,
ansible,
cryptography,
jinja2,
junit-xml,
lxml,
ncclient,
packaging,
paramiko,
ansible-pylibssh,
pexpect,
psutil,
pycrypto,
pyyaml,
requests,
resolvelib,
scp,
windowsSupport ? false,
pywinrm,
xmltodict,
# Additional packages to add to dependencies
extraPackages ? _: [ ],
}:
buildPythonPackage rec {
pname = "ansible-core";
# IMPORTANT: When bumping the minor version (2.XX.0 - the XX), please update pinned package in pkgs/top-level/all-packages.nix
# There are pinned packages called ansible_2_XX, create a new one with the previous minor version and then update the version here
version = "2.19.2";
pyproject = true;
disabled = pythonOlder "3.12";
src = fetchPypi {
pname = "ansible_core";
inherit version;
hash = "sha256-h/y7xJLtFutq2wN5uuCtv2nzzoioRA5+iODc76n4pUw=";
};
# ansible_connection is already wrapped, so don't pass it through
# the python interpreter again, as it would break execution of
# connection plugins.
postPatch = ''
patchShebangs --build packaging/cli-doc/build.py
SETUPTOOLS_PATTERN='"setuptools[0-9 <>=.,]+"'
WHEEL_PATTERN='"wheel[0-9 <>=.,]+"'
echo "Patching pyproject.toml"
# print replaced patterns to stdout
sed -r -i -e 's/'"$SETUPTOOLS_PATTERN"'/"setuptools"/w /dev/stdout' \
-e 's/'"$WHEEL_PATTERN"'/"wheel"/w /dev/stdout' pyproject.toml
'';
nativeBuildInputs = [
installShellFiles
docutils
];
build-system = [ setuptools ];
dependencies = [
# depend on ansible instead of the other way around
ansible
# from requirements.txt
cryptography
jinja2
packaging
pyyaml
resolvelib
# optional dependencies
junit-xml
lxml
ncclient
paramiko
ansible-pylibssh
pexpect
psutil
pycrypto
requests
scp
xmltodict
]
++ lib.optionals windowsSupport [ pywinrm ]
++ extraPackages python.pkgs;
pythonRelaxDeps = [ "resolvelib" ];
postInstall = ''
export HOME="$(mktemp -d)"
packaging/cli-doc/build.py man --output-dir=man
installManPage man/*
'';
# internal import errors, missing dependencies
doCheck = false;
meta = with lib; {
changelog = "https://github.com/ansible/ansible/blob/v${version}/changelogs/CHANGELOG-v${lib.versions.majorMinor version}.rst";
description = "Radically simple IT automation";
homepage = "https://www.ansible.com";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
HarisDotParis
robsliwi
];
};
}

View File

@@ -0,0 +1,107 @@
{
lib,
pythonOlder,
buildPythonPackage,
fetchPypi,
setuptools,
jmespath,
jsonschema,
jxmlease,
ncclient,
netaddr,
paramiko,
ansible-pylibssh,
pynetbox,
scp,
textfsm,
ttp,
xmltodict,
passlib,
# optionals
withJunos ? false,
withNetbox ? false,
}:
let
pname = "ansible";
version = "12.0.0";
in
buildPythonPackage {
inherit pname version;
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchPypi {
inherit pname version;
hash = "sha256-GzrYFY3SWXzkWoZKVcoJ5b4YB8yX9EoAw517ueFSCqY=";
};
# we make ansible-core depend on ansible, not the other way around,
# since when you install ansible-core you will not have ansible
# executables installed in the PATH variable
pythonRemoveDeps = [ "ansible-core" ];
build-system = [ setuptools ];
dependencies = lib.unique (
[
# Support ansible collections by default, make all others optional
# ansible.netcommon
passlib
jxmlease
ncclient
netaddr
paramiko
ansible-pylibssh
xmltodict
# ansible.posix
# ansible.utils
jsonschema
textfsm
ttp
xmltodict
# ansible.windows
# Default ansible collections dependencies
# community.general
jmespath
# lots of collections with dedicated requirements.txt and pyproject.toml files,
# add the dependencies for the collections you need conditionally and install
# ansible using overrides to enable the collections you need.
]
++ lib.optionals withJunos [
# ansible_collections/junipernetworks/junos/requirements.txt
jxmlease
ncclient
paramiko
ansible-pylibssh
scp
xmltodict
]
++ lib.optionals withNetbox [
# ansible_collections/netbox/netbox/pyproject.toml
pynetbox
]
);
# don't try and fail to strip 48000+ non strippable files, it takes >5 minutes!
dontStrip = true;
# difficult to test
doCheck = false;
meta = with lib; {
description = "Radically simple IT automation";
mainProgram = "ansible-community";
homepage = "https://www.ansible.com";
changelog = "https://github.com/ansible-community/ansible-build-data/blob/${version}/${lib.versions.major version}/CHANGELOG-v${lib.versions.major version}.rst";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
HarisDotParis
robsliwi
];
};
}