Commit e8e5ac14 authored by Benjamin Sparks's avatar Benjamin Sparks
Browse files

buildah-unwrapped: fix build on darwin

Go software has a habit of looking for $HOME or $XDG_CACHE_HOME in `init` subroutines, which are called at startup time.
Providing the appropriate env var via `writableTmpDirAsHomeHook` and `versionCheckKeepEnvironment` is the way to go
parent 6b48f708
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
  libapparmor,
  libselinux,
  libseccomp,
  writableTmpDirAsHomeHook,
  versionCheckHook,
}:

@@ -72,8 +73,12 @@ buildGoModule (finalAttrs: {
  '';

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
  nativeInstallCheckInputs = [
    writableTmpDirAsHomeHook
    versionCheckHook
  ];
  versionCheckProgramArg = "--version";
  versionCheckKeepEnvironment = [ "HOME" ];

  meta = {
    description = "Tool which facilitates building OCI images";