uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,82 @@
{ lib
, callPackage
, buildPythonPackage
, fetchPypi
, installShellFiles
, ansible
, 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.13.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-COD7SnGNlnplTnDNpXz5MgGGkyndHPW4pCZ8V8XEyNM=";
};
# 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 instead of the other way around
ansible
# from requirements.txt
cryptography
jinja2
packaging
pyyaml
resolvelib # This library is a PITA, since ansible requires a very old version of it
# 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; {
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; [ ];
};
}

View file

@ -0,0 +1,85 @@
{ lib
, pythonOlder
, buildPythonPackage
, fetchPypi
, jsonschema
, jxmlease
, ncclient
, netaddr
, paramiko
, pynetbox
, scp
, textfsm
, ttp
, xmltodict
# optionals
, withJunos ? false
, withNetbox ? false
}:
let
pname = "ansible";
version = "5.8.0";
in
buildPythonPackage {
inherit pname version;
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-+gVkdiAfQGJfs22VxQQe9GOIC+GL5cc7mYtXtAGWeGM=";
};
postPatch = ''
# we make ansible-core depend on ansible, not the other way around
sed -Ei '/ansible-core/d' setup.py
'';
propagatedBuildInputs = lib.unique ([
# Support ansible collections by default, make all others optional
# ansible.netcommon
jxmlease
ncclient
netaddr
paramiko
xmltodict
# ansible.posix
# ansible.utils
jsonschema
textfsm
ttp
xmltodict
# ansible.windows
# 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
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";
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; [ ];
};
}