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
committed by Florian Brandes
parent 44cad84075
commit 283d58ecbe

View File

@@ -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) \