colima: use lima-bin on darwin for native macOS virtualization support
This commit is contained in:
@@ -1,14 +1,18 @@
|
|||||||
{ lib
|
{ lib
|
||||||
|
, stdenv
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, lima
|
, lima
|
||||||
|
, lima-bin
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, qemu
|
, qemu
|
||||||
, testers
|
, testers
|
||||||
, colima
|
, colima
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let lima-drv = if stdenv.isDarwin then lima-bin else lima;
|
||||||
|
in
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "colima";
|
pname = "colima";
|
||||||
version = "0.5.2";
|
version = "0.5.2";
|
||||||
@@ -41,7 +45,7 @@ buildGoModule rec {
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/colima \
|
wrapProgram $out/bin/colima \
|
||||||
--prefix PATH : ${lib.makeBinPath [ lima qemu ]}
|
--prefix PATH : ${lib.makeBinPath [ lima-drv qemu ]}
|
||||||
|
|
||||||
installShellCompletion --cmd colima \
|
installShellCompletion --cmd colima \
|
||||||
--bash <($out/bin/colima completion bash) \
|
--bash <($out/bin/colima completion bash) \
|
||||||
|
|||||||
Reference in New Issue
Block a user