Commit 22631622 authored by Ihar Hrachyshka's avatar Ihar Hrachyshka
Browse files

lima: fix vz driver support

Otherwise, a newer lima fails to start a ubuntu VM with the following
error:

```
vm driver 'vz' needs macOS 13 or later (Hint: try recompiling Lima if
you are seeing this error on macOS 13)
```

While _13 would technically work, the virt library they use has
availability checks up to 15:

https://github.com/search?q=repo%3ACode-Hex%2Fvz+available+15&type=code
parent 424c9346
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
, sigtool
, makeWrapper
, nix-update-script
, apple-sdk_15
}:

buildGoModule rec {
@@ -26,6 +27,8 @@ buildGoModule rec {
  nativeBuildInputs = [ makeWrapper installShellFiles ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [ xcbuild.xcrun sigtool ];

  buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 ];

  postPatch = ''
    substituteInPlace Makefile \
      --replace-fail 'codesign -f -v --entitlements vz.entitlements -s -' 'codesign -f --entitlements vz.entitlements -s -'