Unverified Commit a6f0c9e6 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

Merge pull request #320822 from caarlos0/mods-update

mods: 1.4.0 -> 1.4.1
parents f02ae945 617fd13c
Loading
Loading
Loading
Loading
+20 −4
Original line number Diff line number Diff line
{
  lib,
  buildGoModule,
  installShellFiles,
  fetchFromGitHub,
  gitUpdater,
  testers,
@@ -9,16 +10,20 @@

buildGoModule rec {
  pname = "mods";
  version = "1.4.0";
  version = "1.4.1";

  src = fetchFromGitHub {
    owner = "charmbracelet";
    repo = "mods";
    rev = "v${version}";
    hash = "sha256-MlFWYoSyk1i2uaD04chajsxKlRMtRceJOCrADMrEL60=";
    hash = "sha256-s2yzrOfZievm7t9NzHojVDNpHkQdZsqdq7zJNO7/SM8=";
  };

  vendorHash = "sha256-bfo91VGwLvCGS+BSfe+9/voTFfG4lMOOfK72gSLyv9c=";
  vendorHash = "sha256-Q+lpf35tAIZSHV8FBmYrgKbg5RTJzS33Zv8AH9bVxLY=";

  nativeBuildInputs = [
    installShellFiles
  ];

  ldflags = [
    "-s"
@@ -41,11 +46,22 @@ buildGoModule rec {
    };
  };

  postInstall = ''
    export HOME=$(mktemp -d)
    $out/bin/mods man > mods.1
    $out/bin/mods completion bash > mods.bash
    $out/bin/mods completion fish > mods.fish
    $out/bin/mods completion zsh > mods.zsh

    installManPage mods.1
    installShellCompletion mods.{bash,fish,zsh}
  '';

  meta = with lib; {
    description = "AI on the command line";
    homepage = "https://github.com/charmbracelet/mods";
    license = licenses.mit;
    maintainers = with maintainers; [ dit7ya ];
    maintainers = with maintainers; [ dit7ya caarlos0 ];
    mainProgram = "mods";
  };
}