2022-10-21 18:38:19 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, installShellFiles }:
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "genact";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.3.0";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "svenstaro";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-iPDIbfbRNhgmTQHw9gNczXTcUaJ0dQpBDHg5ZOQQJ4M=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
cargoHash = "sha256-Hg8Xlcx0j70Z8IwlJPCwm+qhurXjtKGLI3ZUCeHL1KY=";
|
2022-09-22 12:36:57 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2022-09-22 12:36:57 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
postInstall = ''
|
|
|
|
$out/bin/genact --print-manpage > genact.1
|
|
|
|
installManPage genact.1
|
2022-09-22 12:36:57 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
installShellCompletion --cmd genact \
|
|
|
|
--bash <($out/bin/genact --print-completions bash) \
|
|
|
|
--fish <($out/bin/genact --print-completions fish) \
|
|
|
|
--zsh <($out/bin/genact --print-completions zsh)
|
|
|
|
'';
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A nonsense activity generator";
|
|
|
|
homepage = "https://github.com/svenstaro/genact";
|
2022-09-11 15:47:08 +00:00
|
|
|
changelog = "https://github.com/svenstaro/genact/blob/v${version}/CHANGELOG.md";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|