nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ buildGoModule, fetchFromGitHub, lib, installShellFiles, git, makeWrapper}:
2
3buildGoModule rec {
4 pname = "mani";
5 version = "0.24.0";
6
7 src = fetchFromGitHub {
8 owner = "alajmo";
9 repo = "mani";
10 rev = "v${version}";
11 sha256 = "sha256-ROFqeRa43qDjO+xwC68gJJqLeLSRiX+L/gf2o8kURaI=";
12 };
13
14 vendorHash = "sha256-mFan09oJ+BPVJHAxoROj282WJ+4e7TD0ZqeQH1kDabQ=";
15
16 nativeBuildInputs = [ installShellFiles makeWrapper ];
17
18 ldflags = [ "-s" "-w" "-X github.com/alajmo/mani/cmd.version=${version}" ];
19
20 postInstall = ''
21 installShellCompletion --cmd mani \
22 --bash <($out/bin/mani completion bash) \
23 --fish <($out/bin/mani completion fish) \
24 --zsh <($out/bin/mani completion zsh)
25
26 wrapProgram $out/bin/mani \
27 --prefix PATH : ${lib.makeBinPath [ git ]}
28 '';
29
30 # Skip tests
31 # The repo's test folder has a README.md with detailed information. I don't
32 # know how to wrap the dependencies for these integration tests so skip for now.
33 doCheck = false;
34
35 meta = with lib; {
36 description = "CLI tool to help you manage multiple repositories";
37 longDescription = ''
38 mani is a CLI tool that helps you manage multiple repositories. It's useful
39 when you are working with microservices, multi-project systems, many
40 libraries or just a bunch of repositories and want a central place for
41 pulling all repositories and running commands over them.
42 '';
43 homepage = "https://manicli.com/";
44 changelog = "https://github.com/alajmo/mani/releases/tag/v${version}";
45 license = licenses.mit;
46 };
47}