From 617fd13c71cb457d6b78308afb1d1fedb4532a75 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Tue, 18 Jun 2024 13:28:54 -0300 Subject: [PATCH] mods: 1.4.0 -> 1.4.1 Signed-off-by: Carlos Alexandro Becker --- pkgs/by-name/mo/mods/package.nix | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/mo/mods/package.nix b/pkgs/by-name/mo/mods/package.nix index 8f3b3b78220c..abad5bc7b678 100644 --- a/pkgs/by-name/mo/mods/package.nix +++ b/pkgs/by-name/mo/mods/package.nix @@ -1,6 +1,7 @@ { 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"; }; }