22, rustPlatform
33, fetchFromGitHub
44, stdenv
5- , enableCompletions ? stdenv . hostPlatform == stdenv . buildPlatform
65, installShellFiles
6+ , installShellCompletions ? stdenv . hostPlatform == stdenv . buildPlatform
7+ , installManPages ? stdenv . hostPlatform == stdenv . buildPlatform
78, pkg-config
89, Security
910, libiconv
1213
1314rustPlatform . buildRustPackage rec {
1415 pname = "himalaya" ;
15- version = "0.6.0 " ;
16+ version = "0.6.2 " ;
1617
1718 src = fetchFromGitHub {
1819 owner = "soywod" ;
@@ -23,7 +24,8 @@ rustPlatform.buildRustPackage rec {
2324
2425 cargoSha256 = "sha256-ICaahkIP1uSm4iXvSPMo8uVTtSa1nCyJdDihGdVEQvg=" ;
2526
26- nativeBuildInputs = lib . optionals enableCompletions [ installShellFiles ]
27+ nativeBuildInputs = [ ]
28+ ++ lib . optionals ( installManPages || installShellCompletions ) [ installShellFiles ]
2729 ++ lib . optionals ( ! stdenv . hostPlatform . isDarwin ) [ pkg-config ] ;
2830
2931 buildInputs =
@@ -38,8 +40,14 @@ rustPlatform.buildRustPackage rec {
3840 # additional tooling and servers to test
3941 cargoTestFlags = [ "--lib" ] ;
4042
41- postInstall = lib . optionalString enableCompletions ''
42- # Install shell function
43+
44+ postInstall = lib . optionalString installManPages ''
45+ # Install man pages
46+ mkdir -p $out/man
47+ $out/bin/himalaya man $out/man
48+ installManPage $out/man/*
49+ '' ++ lib . optionalString installShellCompletions ''
50+ # Install shell completions
4351 installShellCompletion --cmd himalaya \
4452 --bash <($out/bin/himalaya completion bash) \
4553 --fish <($out/bin/himalaya completion fish) \
@@ -50,7 +58,7 @@ rustPlatform.buildRustPackage rec {
5058 description = "Command-line interface for email management" ;
5159 homepage = "https://github.com/soywod/himalaya" ;
5260 changelog = "https://github.com/soywod/himalaya/blob/v${ version } /CHANGELOG.md" ;
53- license = licenses . bsdOriginal ;
54- maintainers = with maintainers ; [ toastal yanganto ] ;
61+ license = licenses . mit ;
62+ maintainers = with maintainers ; [ soywod toastal yanganto ] ;
5563 } ;
5664}
0 commit comments