blob: 197fe158618d808d580f175942cabbee920bcc4b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, installShellFiles
, installShellCompletions ? stdenv.hostPlatform == stdenv.buildPlatform
, installManPages ? stdenv.hostPlatform == stdenv.buildPlatform
, notmuch
, withImapBackend ? true
, withNotmuchBackend ? false
, withSmtpSender ? true
}:
rustPlatform.buildRustPackage rec {
pname = "himalaya";
version = "0.8.4";
src = fetchFromGitHub {
owner = "soywod";
repo = pname;
rev = "v${version}";
hash = "sha256-AImLYRRCL6IvoSeMFH2mbkNOvUmLwIvhWB3cOoqDljk=";
};
cargoSha256 = "deJZPaZW6rb7A6wOL3vcphBXu0F7EXc1xRwSDY/v8l4=";
nativeBuildInputs = lib.optional (installManPages || installShellCompletions) installShellFiles;
buildInputs = lib.optional withNotmuchBackend notmuch;
buildNoDefaultFeatures = true;
buildFeatures = [ ]
++ lib.optional withImapBackend "imap-backend"
++ lib.optional withNotmuchBackend "notmuch-backend"
++ lib.optional withSmtpSender "smtp-sender";
postInstall = lib.optionalString installManPages ''
mkdir -p $out/man
$out/bin/himalaya man $out/man
installManPage $out/man/*
'' + lib.optionalString installShellCompletions ''
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 to manage your emails.";
homepage = "https://pimalaya.org/himalaya/";
changelog = "https://github.com/soywod/himalaya/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ soywod toastal yanganto ];
};
}
|