13 # use lima-bin on darwin to support native macOS virtualization
14 # https://github.com/NixOS/nixpkgs/pull/209171
15 , lima-drv ? if stdenv.isDarwin then lima-bin else lima
22 src = fetchFromGitHub {
26 hash = "sha256-9mBjK+VArfsLfwRRIFn8kY2scAtvIjIMWX84Bi7MBvU=";
27 # We need the git revision
30 git -C $out rev-parse --short HEAD > $out/.git-revision
35 nativeBuildInputs = [ installShellFiles makeWrapper ]
36 ++ lib.optionals stdenv.isDarwin [ darwin.DarwinTools ];
38 vendorHash = "sha256-QS0TwXI2Md+PXmT2UrzCMQoHRj+wjTSjWPv9CeVzyFU=";
40 # disable flaky Test_extractZones
41 # https://hydra.nixos.org/build/212378003/log
42 excludedPackages = "gvproxy";
47 ldflags="-s -w -X github.com/abiosoft/colima/config.appVersion=${version} \
48 -X github.com/abiosoft/colima/config.revision=$(cat .git-revision)"
52 wrapProgram $out/bin/colima \
53 --prefix PATH : ${lib.makeBinPath [ lima-drv qemu ]}
55 installShellCompletion --cmd colima \
56 --bash <($out/bin/colima completion bash) \
57 --fish <($out/bin/colima completion fish) \
58 --zsh <($out/bin/colima completion zsh)
61 passthru.tests.version = testers.testVersion {
63 command = "HOME=$(mktemp -d) colima version";
67 description = "Container runtimes with minimal setup";
68 homepage = "https://github.com/abiosoft/colima";
69 license = licenses.mit;
70 maintainers = with maintainers; [ aaschmid tricktron ];
71 mainProgram = "colima";