diff --git a/pkgs/by-name/li/lima/additional-guestagents.nix b/pkgs/by-name/li/lima/additional-guestagents.nix index 8f95811f21ac..296c797a27e2 100644 --- a/pkgs/by-name/li/lima/additional-guestagents.nix +++ b/pkgs/by-name/li/lima/additional-guestagents.nix @@ -7,12 +7,15 @@ findutils, }: +let + source = callPackage ./source.nix { }; +in buildGoModule (finalAttrs: { pname = "lima-additional-guestagents"; # Because agents must use the same version as lima, lima's updateScript should also update the shared src. # nixpkgs-update: no auto update - inherit (callPackage ./source.nix { }) version src vendorHash; + inherit (source) version src vendorHash; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 @@ -56,8 +59,7 @@ buildGoModule (finalAttrs: { runHook postInstallCheck ''; - meta = { - homepage = "https://github.com/lima-vm/lima"; + meta = source.meta // { description = "Lima Guest Agents for emulating non-native architectures"; longDescription = '' This package should only be used when your guest's architecture differs from the host's. @@ -71,8 +73,5 @@ buildGoModule (finalAttrs: { Typically, you won't need to directly add this package to your *.nix files. ''; - changelog = "https://github.com/lima-vm/lima/releases/tag/v${finalAttrs.version}"; - license = lib.licenses.asl20; - maintainers = [ ]; }; }) diff --git a/pkgs/by-name/li/lima/package.nix b/pkgs/by-name/li/lima/package.nix index 96b2e043dd4a..373f033929e2 100644 --- a/pkgs/by-name/li/lima/package.nix +++ b/pkgs/by-name/li/lima/package.nix @@ -20,10 +20,13 @@ jq, }: +let + source = callPackage ./source.nix { }; +in buildGoModule (finalAttrs: { pname = "lima"; - inherit (callPackage ./source.nix { }) version src vendorHash; + inherit (source) version src vendorHash; nativeBuildInputs = [ makeWrapper @@ -158,13 +161,7 @@ buildGoModule (finalAttrs: { }; }; - meta = { - homepage = "https://github.com/lima-vm/lima"; + meta = source.meta // { description = "Linux virtual machines with automatic file sharing and port forwarding"; - changelog = "https://github.com/lima-vm/lima/releases/tag/v${finalAttrs.version}"; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ - anhduy - ]; }; }) diff --git a/pkgs/by-name/li/lima/source.nix b/pkgs/by-name/li/lima/source.nix index 215f72966a26..99259ed5e823 100644 --- a/pkgs/by-name/li/lima/source.nix +++ b/pkgs/by-name/li/lima/source.nix @@ -1,4 +1,5 @@ { + lib, fetchFromGitHub, }: @@ -16,4 +17,14 @@ in }; vendorHash = "sha256-SeLYVQI+ZIbR9qVaNyF89VUvXdfv1M5iM+Cbas6e2E0="; + + meta = { + homepage = "https://github.com/lima-vm/lima"; + changelog = "https://github.com/lima-vm/lima/releases/tag/v${version}"; + knownVulnerabilities = lib.optional (lib.versionOlder version "2") "Lima version ${version} is EOL. See https://lima-vm.io/docs/releases/."; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ + anhduy + ]; + }; }