Unverified Commit 900ebdb9 authored by Kenichi Kamiya's avatar Kenichi Kamiya
Browse files

lima, lima-additional-guestagents: share source

parent 3d696649
Loading
Loading
Loading
Loading
+4 −15
Original line number Diff line number Diff line
@@ -2,24 +2,17 @@
  lib,
  stdenv,
  buildGoModule,
  fetchFromGitHub,
  nix-update-script,
  callPackage,
  apple-sdk_15,
  findutils,
}:

buildGoModule (finalAttrs: {
  pname = "lima-additional-guestagents";
  version = "1.2.1";

  src = fetchFromGitHub {
    owner = "lima-vm";
    repo = "lima";
    tag = "v${finalAttrs.version}";
    hash = "sha256-90fFsS5jidaovE2iqXfe4T2SgZJz6ScOwPPYxCsCk/k=";
  };

  vendorHash = "sha256-8S5tAL7GY7dxNdyC+WOrOZ+GfTKTSX84sG8WcSec2Os=";
  # 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;

  buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
    apple-sdk_15
@@ -63,10 +56,6 @@ buildGoModule (finalAttrs: {
    runHook postInstallCheck
  '';

  passthru = {
    updateScript = nix-update-script { };
  };

  meta = {
    homepage = "https://github.com/lima-vm/lima";
    description = "Lima Guest Agents for emulating non-native architectures";
+8 −11
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
  lib,
  stdenv,
  buildGoModule,
  fetchFromGitHub,
  callPackage,
  installShellFiles,
  qemu,
  darwin,
@@ -22,16 +22,8 @@

buildGoModule (finalAttrs: {
  pname = "lima";
  version = "1.2.1";

  src = fetchFromGitHub {
    owner = "lima-vm";
    repo = "lima";
    tag = "v${finalAttrs.version}";
    hash = "sha256-90fFsS5jidaovE2iqXfe4T2SgZJz6ScOwPPYxCsCk/k=";
  };

  vendorHash = "sha256-8S5tAL7GY7dxNdyC+WOrOZ+GfTKTSX84sG8WcSec2Os=";
  inherit (callPackage ./source.nix { }) version src vendorHash;

  nativeBuildInputs = [
    makeWrapper
@@ -159,7 +151,12 @@ buildGoModule (finalAttrs: {
        };
      };

    updateScript = nix-update-script { };
    updateScript = nix-update-script {
      extraArgs = [
        "--override-filename"
        ./source.nix
      ];
    };
  };

  meta = {
+19 −0
Original line number Diff line number Diff line
{
  fetchFromGitHub,
}:

let
  version = "1.2.1";
in
{
  inherit version;

  src = fetchFromGitHub {
    owner = "lima-vm";
    repo = "lima";
    tag = "v${version}";
    hash = "sha256-90fFsS5jidaovE2iqXfe4T2SgZJz6ScOwPPYxCsCk/k=";
  };

  vendorHash = "sha256-8S5tAL7GY7dxNdyC+WOrOZ+GfTKTSX84sG8WcSec2Os=";
}
+2 −0
Original line number Diff line number Diff line
@@ -5433,6 +5433,8 @@ with pkgs;
    withQt = true;
  };

  lima-additional-guestagents = callPackage ../by-name/li/lima/additional-guestagents.nix { };

  lld = llvmPackages.lld;
  lld_12 = llvmPackages_12.lld;
  lld_13 = llvmPackages_13.lld;