2022-09-20 03:15:59 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, madonctl }:
|
2017-04-21 12:37:46 +00:00
|
|
|
|
2022-09-20 03:15:59 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "madonctl";
|
2022-09-20 03:15:59 +00:00
|
|
|
version = "2.3.2";
|
2017-04-21 12:37:46 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "McKael";
|
|
|
|
repo = "madonctl";
|
2022-09-20 03:15:59 +00:00
|
|
|
rev = "v${version}";
|
2023-01-24 12:55:52 +00:00
|
|
|
hash = "sha256-mo185EKjLkiujAKcAFM1XqkXWvcfYbnv+r3dF9ywaf8=";
|
2017-04-21 12:37:46 +00:00
|
|
|
};
|
|
|
|
|
2023-01-24 12:55:52 +00:00
|
|
|
vendorHash = null;
|
2022-09-20 03:15:59 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
2017-05-20 17:06:34 +00:00
|
|
|
|
2022-09-20 03:15:59 +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";
|
|
|
|
};
|
2017-05-20 17:06:34 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-04-21 12:37:46 +00:00
|
|
|
description = "CLI for the Mastodon social network API";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/McKael/madonctl";
|
2017-04-21 12:37:46 +00:00
|
|
|
license = licenses.mit;
|
2023-09-23 12:35:29 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-04-21 12:37:46 +00:00
|
|
|
};
|
|
|
|
}
|