use pre-built guestfs appliance via libguestfs-with-appliance
Set LIBGUESTFS_PATH so virt-customize uses the nixpkgs pre-built appliance instead of building one at runtime. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
192ea9b54d
commit
f586fa8b6a
2 changed files with 3 additions and 1 deletions
|
|
@ -38,6 +38,7 @@
|
|||
[ -n "${diskSize}" ] && qemu-img resize ${resultImg} ${diskSize}
|
||||
|
||||
# run script inside image using virt-customize
|
||||
export LIBGUESTFS_PATH="${pkgs.libguestfs-with-appliance}/lib/guestfs"
|
||||
export LIBGUESTFS_APPEND="ipv6.disable=1"
|
||||
|
||||
${pkgs.guestfs-tools}/bin/virt-customize \
|
||||
|
|
|
|||
|
|
@ -137,7 +137,8 @@
|
|||
mv ${resultImg} $out
|
||||
'';
|
||||
builtImage = pkgs.runCommand customImageName ({
|
||||
nativeBuildInputs = with pkgs; [ qemu perl guestfs-tools ];
|
||||
nativeBuildInputs = with pkgs; [ qemu perl guestfs-tools libguestfs-with-appliance ];
|
||||
LIBGUESTFS_PATH = "${pkgs.libguestfs-with-appliance}/lib/guestfs";
|
||||
requiredSystemFeatures = [ "kvm" ];
|
||||
} // lib.optionalAttrs impure { __noChroot = true; }) builderCommand;
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue