colima: use lima-bin on darwin for native macOS virtualization support

This commit is contained in:
Thibault Gagnaux 2023-01-27 17:15:00 +01:00
parent 6173948c03
commit 75617407d2
No known key found for this signature in database
GPG key ID: 44BD0764ACAE8E25

View file

@ -1,14 +1,18 @@
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, installShellFiles
, lima
, lima-bin
, makeWrapper
, qemu
, testers
, colima
}:
let lima-drv = if stdenv.isDarwin then lima-bin else lima;
in
buildGoModule rec {
pname = "colima";
version = "0.5.2";
@ -41,7 +45,7 @@ buildGoModule rec {
postInstall = ''
wrapProgram $out/bin/colima \
--prefix PATH : ${lib.makeBinPath [ lima qemu ]}
--prefix PATH : ${lib.makeBinPath [ lima-drv qemu ]}
installShellCompletion --cmd colima \
--bash <($out/bin/colima completion bash) \