mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-22 08:30:57 +00:00
lima: 0.22.1 -> 1.0.1 (also fixes vz) (#355729)
This commit is contained in:
@@ -4,32 +4,33 @@
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, qemu
|
||||
, xcbuild
|
||||
, sigtool
|
||||
, makeWrapper
|
||||
, nix-update-script
|
||||
, apple-sdk_15
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "lima";
|
||||
version = "0.22.0";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lima-vm";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-ZX2FSZz9q56zWPSHPvXUOf2lzBupjgdTXgWpH1SBJY8=";
|
||||
sha256 = "sha256-XYB8Nxbs76xmiiZ7IYfgn+UgUr6CLOalQrl6Ibo+DRc=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-P0Qnfu/cqLveAwz9jf/wTXxkoh0jvazlE5C/PcUrWsA=";
|
||||
vendorHash = "sha256-nNSBwvhKSWs6to37+RLziYQqVOYfvjYib3fRRALACho=";
|
||||
|
||||
nativeBuildInputs = [ makeWrapper installShellFiles ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild.xcrun sigtool ];
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ sigtool ];
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 ];
|
||||
|
||||
# clean fails with read only vendor dir
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace 'binaries: clean' 'binaries:' \
|
||||
--replace 'codesign --entitlements vz.entitlements -s -' 'codesign --force --entitlements vz.entitlements -s -'
|
||||
--replace-fail 'codesign -f -v --entitlements vz.entitlements -s -' 'codesign -f --entitlements vz.entitlements -s -'
|
||||
'';
|
||||
|
||||
# It attaches entitlements with codesign and strip removes those,
|
||||
@@ -57,9 +58,11 @@ buildGoModule rec {
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
USER=nix $out/bin/limactl validate examples/default.yaml
|
||||
USER=nix $out/bin/limactl validate templates/default.yaml
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/lima-vm/lima";
|
||||
description = "Linux virtual machines (on macOS, in most cases)";
|
||||
|
||||
Reference in New Issue
Block a user