lima: init at 0.4.0

This commit is contained in:
Vo Anh Duy 2021-06-25 17:39:49 +08:00 committed by zowoq
parent caf1aaa687
commit 00cba5e8e7
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,53 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, qemu
, makeWrapper
}:
buildGoModule rec {
pname = "lima";
version = "0.4.0";
src = fetchFromGitHub {
owner = "AkihiroSuda";
repo = pname;
rev = "v${version}";
sha256 = "sha256-vwAxVBy2SqghxJGscSZ1o1B8EMvQh1fz5CS1YG7Rq2g=";
};
vendorSha256 = "sha256-xM9LLh5c5QBrcIptdqiNNp1nU9GcdQvwrCnnyuXWYfE=";
nativeBuildInputs = [ makeWrapper installShellFiles ];
buildPhase = ''
runHook preBuild
make "VERSION=v${version}" binaries
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r _output/* $out
wrapProgram $out/bin/limactl \
--prefix PATH : ${lib.makeBinPath [ qemu ]}
installShellCompletion --cmd limactl \
--bash <($out/bin/limactl completion bash)
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
USER=nix $out/bin/limactl validate examples/default.yaml
'';
meta = with lib; {
homepage = "https://github.com/AkihiroSuda/lima";
description = "Linux virtual machines (on macOS, in most cases)";
license = licenses.asl20;
maintainers = with maintainers; [ anhduy ];
};
}

View file

@ -30742,6 +30742,8 @@ in
idsk = callPackage ../tools/filesystems/idsk { };
lima = callPackage ../applications/virtualization/lima {};
logtop = callPackage ../tools/misc/logtop { };
igraph = callPackage ../development/libraries/igraph { };