Skip to content

Commit

Permalink
ovftool: add installCheckPhase
Browse files Browse the repository at this point in the history
  • Loading branch information
numinit committed Feb 16, 2023
1 parent 6fe8f6f commit 83a0f5e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,6 @@ trim_trailing_whitespace = unset

[pkgs/tools/misc/timidity/timidity.cfg]
trim_trailing_whitespace = unset

[pkgs/tools/virtualization/ovftool/*.ova]
trim_trailing_whitespace = unset
14 changes: 14 additions & 0 deletions pkgs/tools/virtualization/ovftool/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,20 @@ stdenv.mkDerivation rec {
addAutoPatchelfSearchPath "$out/lib"
'';

doInstallCheck = true;

installCheckPhase = ''
# This is a NixOS 22.11 image (doesn't actually matter) with a 1 MiB root disk that's all zero.
# Make sure that it converts properly.
mkdir -p ovftool-check
cd ovftool-check
$out/bin/ovftool ${./installCheckPhase.ova} nixos.ovf
if [ ! -f nixos.ovf ] || [ ! -f nixos.mf ] || [ ! -f nixos-disk1.vmdk ]; then
exit 1
fi
'';

meta = with lib; {
description = "VMWare tools for working with OVF, OVA, and VMX images";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
Expand Down
Binary file not shown.

0 comments on commit 83a0f5e

Please sign in to comment.