2022-09-22 12:36:57 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, madonctl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "madonctl";
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "2.3.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "McKael";
|
|
|
|
repo = "madonctl";
|
2022-09-22 12:36:57 +00:00
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-mo185EKjLkiujAKcAFM1XqkXWvcfYbnv+r3dF9ywaf8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
vendorHash = null;
|
2022-09-22 12:36:57 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd madonctl \
|
|
|
|
--bash <($out/bin/madonctl completion bash) \
|
|
|
|
--zsh <($out/bin/madonctl completion zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = madonctl;
|
|
|
|
command = "madonctl version";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "CLI for the Mastodon social network API";
|
|
|
|
homepage = "https://github.com/McKael/madonctl";
|
|
|
|
license = licenses.mit;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "madonctl";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|