2021-12-06 16:07:01 +00:00
|
|
|
{ buildGoModule, fetchFromGitHub, lib, installShellFiles, git, makeWrapper}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "mani";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "0.23.0";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alajmo";
|
|
|
|
repo = "mani";
|
|
|
|
rev = "v${version}";
|
2023-01-11 07:51:40 +00:00
|
|
|
sha256 = "sha256-PuoGuweuDcSM1qfjXABSdoqbMLc5a+lYGFr0kZZkgVE=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
vendorHash = "sha256-9DP6SRcvHtZhkk2XoYesC1mhfq06KsLs0X02AG9vwJ8=";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X github.com/alajmo/mani/cmd.version=${version}" ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd mani \
|
|
|
|
--bash <($out/bin/mani completion bash) \
|
|
|
|
--fish <($out/bin/mani completion fish) \
|
|
|
|
--zsh <($out/bin/mani completion zsh)
|
|
|
|
|
|
|
|
wrapProgram $out/bin/mani \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ git ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Skip tests
|
|
|
|
# The repo's test folder has a README.md with detailed information. I don't
|
|
|
|
# know how to wrap the dependencies for these integration tests so skip for now.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI tool to help you manage multiple repositories";
|
|
|
|
longDescription = ''
|
|
|
|
mani is a CLI tool that helps you manage multiple repositories. It's useful
|
|
|
|
when you are working with microservices, multi-project systems, many
|
|
|
|
libraries or just a bunch of repositories and want a central place for
|
|
|
|
pulling all repositories and running commands over them.
|
|
|
|
'';
|
|
|
|
homepage = "https://manicli.com/";
|
|
|
|
changelog = "https://github.com/alajmo/mani/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|