3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/mailreaders/himalaya/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, rustPlatform
, fetchFromGitHub
2021-10-25 16:36:50 +01:00
, stdenv
, enableCompletions ? stdenv.hostPlatform == stdenv.buildPlatform
2021-10-25 16:36:50 +01:00
, installShellFiles
, pkg-config
, Security
, libiconv
2021-10-25 16:36:50 +01:00
, openssl
}:
2021-10-25 16:36:50 +01:00
rustPlatform.buildRustPackage rec {
pname = "himalaya";
2022-03-21 08:09:09 +00:00
version = "0.5.10";
src = fetchFromGitHub {
owner = "soywod";
repo = pname;
rev = "v${version}";
2022-03-21 08:09:09 +00:00
sha256 = "sha256-CXchZbXX7NH2ZXeAoPph3qxxdcAdDVZLBmOMwxFu+Yo=";
};
2022-03-21 08:09:09 +00:00
cargoSha256 = "sha256-sSQX7DHDgh1eO1Dwn1f0m51Bl2ZG1daRtrnYvsvPOkg=";
2021-10-25 16:36:50 +01:00
nativeBuildInputs = lib.optionals enableCompletions [ installShellFiles ]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ pkg-config ];
buildInputs =
if stdenv.hostPlatform.isDarwin then [
Security
libiconv
] else [
openssl
];
# flag added because without end-to-end testing is ran which requires
# additional tooling and servers to test
cargoTestFlags = [ "--lib" ];
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 = "Command-line interface for email management";
homepage = "https://github.com/soywod/himalaya";
2021-10-25 16:36:50 +01:00
changelog = "https://github.com/soywod/himalaya/blob/v${version}/CHANGELOG.md";
license = licenses.bsdOriginal;
maintainers = with maintainers; [ toastal yanganto ];
};
}