nixpkgs/pkgs/applications/misc/madonctl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
902 B
Nix
Raw Normal View History

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 {
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
meta = with lib; {
2017-04-21 12:37:46 +00:00
description = "CLI for the Mastodon social network API";
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
};
}