Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Feb 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkgs/applications/virtualization/colima/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, installShellFiles
, lima
, lima-bin
, makeWrapper
, qemu
, testers
, colima
# use lima-bin on darwin to support native macOS virtualization
# https://github.com/NixOS/nixpkgs/pull/209171
, lima-drv ? if stdenv.isDarwin then lima-bin else lima
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit I would probably inline this unless it is desirable to be overwritable

}:

buildGoModule rec {
Expand Down Expand Up @@ -41,7 +46,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) \
Expand Down