cloud-init: fix network renderer detection

This commit is contained in:
illustris 2022-01-28 19:14:02 +05:30
parent 8a5e9ef604
commit d0c12f5b3f
2 changed files with 11 additions and 1 deletions

View File

@ -1,11 +1,14 @@
{ lib
, nixosTests
, buildPythonApplication
, cloud-utils
, dmidecode
, fetchFromGitHub
, iproute2
, openssh
, python3
, shadow
, systemd
}:
python3.pkgs.buildPythonApplication rec {
@ -25,6 +28,13 @@ python3.pkgs.buildPythonApplication rec {
prePatch = ''
substituteInPlace setup.py \
--replace /lib/systemd $out/lib/systemd
substituteInPlace cloudinit/net/networkd.py \
--replace "['/usr/sbin', '/bin']" "['/usr/sbin', '/bin', '${iproute2}/bin', '${systemd}/bin']"
substituteInPlace tests/unittests/test_net_activators.py \
--replace "['/usr/sbin', '/bin']" \
"['/usr/sbin', '/bin', '${iproute2}/bin', '${systemd}/bin']"
'';
postInstall = ''

View File

@ -2521,7 +2521,7 @@ with pkgs;
clog-cli = callPackage ../development/tools/clog-cli { };
cloud-init = python3.pkgs.callPackage ../tools/virtualization/cloud-init { };
cloud-init = python3.pkgs.callPackage ../tools/virtualization/cloud-init { inherit systemd; };
cloudbrute = callPackage ../tools/security/cloudbrute { };