1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

Merge pull request #287757 from Ligthiago/sttr

sttr: init at 0.2.18
This commit is contained in:
Nikolay Korotkiy 2024-02-11 19:19:27 +04:00 committed by GitHub
commit 9b7c8df897
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,43 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
pname = "sttr";
version = "0.2.18";
src = fetchFromGitHub {
owner = "abhimanyu003";
repo = "sttr";
rev = "v${version}";
hash = "sha256-zZ9zrKUbrRaYQrlUtjOZLfEuiaqp/yyXpOlDspBJbSQ=";
};
vendorHash = "sha256-io56WqF3cAyNK7Auhdq2iB26B6wjcVnq9cr3NS/4Z0w=";
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
"-X=main.version=${version}"
];
postInstall = ''
installShellCompletion --cmd sttr \
--bash <($out/bin/sttr completion bash) \
--fish <($out/bin/sttr completion fish) \
--zsh <($out/bin/sttr completion zsh)
'';
meta = with lib; {
description = "Cross-platform cli tool to perform various operations on string";
homepage = "https://github.com/abhimanyu003/sttr";
changelog = "https://github.com/abhimanyu003/sttr/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ Ligthiago ];
mainProgram = "sttr";
};
}