Unverified Commit 83fb7bff authored by Tiago Ferreira's avatar Tiago Ferreira
Browse files

colima: add krunkit to PATH on aarch64-darwin

Enables `colima start --vm-type krunkit` to work out of the box
on Apple Silicon by conditionally including krunkit in the wrapper
PATH when available on the host platform.
parent 31e794f3
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
  buildGoModule,
  fetchFromGitHub,
  installShellFiles,
  krunkit,
  lima-full,
  makeWrapper,
  procps,
@@ -60,11 +61,14 @@ buildGoModule (finalAttrs: {
  postInstall = ''
    wrapProgram $out/bin/colima \
      --prefix PATH : ${
        lib.makeBinPath [
        lib.makeBinPath (
          [
            # Suppress warning on `colima start`: https://github.com/abiosoft/colima/issues/1333
            lima-full
            qemu
          ]
          ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform krunkit) krunkit
        )
      }

    installShellCompletion --cmd colima \