himalaya: init at 0.2.6

- make shell completion optional
- specify security and libiconv for apple
This commit is contained in:
Antonio Yang 2021-04-19 17:08:34 +08:00
parent a03f318104
commit 41f00c8918
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,54 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, openssl
, pkg-config
, installShellFiles
, enableCompletions ? stdenv.hostPlatform == stdenv.buildPlatform
, Security
, libiconv
}:
rustPlatform.buildRustPackage rec {
pname = "himalaya";
version = "0.2.6";
src = fetchFromGitHub {
owner = "soywod";
repo = pname;
rev = "v${version}";
sha256 = "1fl3lingb4wdh6bz4calzbibixg44wnnwi1qh0js1ijp8b6ll560";
};
cargoSha256 = "10p8di71w7hn36b1994wgk33fnj641lsp80zmccinlg5fiwyzncx";
nativeBuildInputs = [ ]
++ lib.optionals (enableCompletions) [ installShellFiles ]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ pkg-config ];
buildInputs =
if stdenv.hostPlatform.isDarwin then [
Security
libiconv
] else [
openssl
];
# The completions are correctly installed, and there is issue that himalaya
# generate empty completion files without mail configure.
# This supposed to be fixed in 0.2.7
postInstall = lib.optionalString enableCompletions ''
# Install shell function
installShellCompletion --cmd himalaya \
--bash <($out/bin/himalaya completion bash) \
--fish <($out/bin/himalaya completion fish) \
--zsh <($out/bin/himalaya completion zsh)
'';
meta = with lib; {
description = "CLI email client written in Rust";
homepage = "https://github.com/soywod/himalaya";
license = licenses.bsd3;
maintainers = with maintainers; [ yanganto ];
};
}

View File

@ -23479,6 +23479,10 @@ in
hexedit = callPackage ../applications/editors/hexedit { };
himalaya = callPackage ../applications/networking/mailreaders/himalaya {
inherit (darwin.apple_sdk.frameworks) Security;
};
hipchat = callPackage ../applications/networking/instant-messengers/hipchat { };
hivelytracker = callPackage ../applications/audio/hivelytracker { };