1 { lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-Rn9kJWutWKPj9cLu2ZJKITmC+I8/ikhCAoIp00Yg6ZA=";
14 cargoHash = "sha256-kmXtwS5pCLEq5dbNHtWYGzDKjOUlVlr5xippVd2wl8k=";
16 nativeBuildInputs = [ installShellFiles ];
18 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
19 $out/bin/genact --print-manpage > genact.1
20 installManPage genact.1
22 installShellCompletion --cmd genact \
23 --bash <($out/bin/genact --print-completions bash) \
24 --fish <($out/bin/genact --print-completions fish) \
25 --zsh <($out/bin/genact --print-completions zsh)
29 description = "Nonsense activity generator";
30 homepage = "https://github.com/svenstaro/genact";
31 changelog = "https://github.com/svenstaro/genact/blob/v${version}/CHANGELOG.md";
32 license = licenses.mit;
33 maintainers = with maintainers; [ figsoda ];
34 mainProgram = "genact";