Merge pull request #215330 from soywod/master

himalaya: 0.6.0 -> 0.7.1
This commit is contained in:
Naïm Favier 2023-03-24 10:19:07 +01:00 committed by GitHub
commit 4f9bedb8d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 26 deletions

View file

@ -14178,6 +14178,16 @@
githubId = 6277322;
name = "Wei Tang";
};
soywod = {
name = "Clément DOUIN";
email = "clement.douin@posteo.net";
matrix = "@soywod:matrix.org";
github = "soywod";
githubId = 10437171;
keys = [{
fingerprint = "75F0 AB7C FE01 D077 AEE6 CAFD 353E 4A18 EE0F AB72";
}];
};
spacefrogg = {
email = "spacefrogg-nixos@meterriblecrew.net";
github = "spacefrogg";

View file

@ -5,6 +5,7 @@
, buildGoModule
, buildVimPluginFrom2Nix
, fetchFromGitHub
, fetchFromSourcehut
, fetchpatch
, fetchurl
, substituteAll
@ -496,12 +497,13 @@ self: super: {
});
himalaya-vim = super.himalaya-vim.overrideAttrs (old: {
postPatch = ''
substituteInPlace plugin/himalaya.vim \
--replace "if !executable('himalaya')" "if v:false"
substituteInPlace autoload/himalaya/request.vim \
--replace "'himalaya" "'${himalaya}/bin/himalaya"
'';
buildInputs = [ himalaya ];
src = fetchFromSourcehut {
owner = "~soywod";
repo = "himalaya-vim";
rev = "v${himalaya.version}";
sha256 = "W+91hnNeS6WkDiR9r1s7xPTK9JlCWiVkI/nXVYbepY0=";
};
});
jedi-vim = super.jedi-vim.overrideAttrs (old: {

View file

@ -2,44 +2,51 @@
, rustPlatform
, fetchFromGitHub
, stdenv
, enableCompletions ? stdenv.hostPlatform == stdenv.buildPlatform
, installShellFiles
, installShellCompletions ? stdenv.hostPlatform == stdenv.buildPlatform
, installManPages ? stdenv.hostPlatform == stdenv.buildPlatform
, pkg-config
, Security
, libiconv
, openssl
, notmuch
, withImapBackend ? true
, withNotmuchBackend ? false
, withSmtpSender ? true
}:
rustPlatform.buildRustPackage rec {
pname = "himalaya";
version = "0.6.0";
version = "0.7.1";
src = fetchFromGitHub {
owner = "soywod";
repo = pname;
rev = "v${version}";
sha256 = "sha256-d+ERCUPUHx41HfBtjb6BjhGKzkUTGIb01BRWvAnLYwk=";
sha256 = "sha256-yAfNH9LSXlS/Hzi5kAuur5BX2vITMucprDzxhlV8RiY=";
};
cargoSha256 = "sha256-ICaahkIP1uSm4iXvSPMo8uVTtSa1nCyJdDihGdVEQvg=";
cargoSha256 = "sha256-FXfh6T8dNsnD/V/wYSMDWs+ll0d1jg1Dc3cQT39b0ws=";
nativeBuildInputs = lib.optionals enableCompletions [ installShellFiles ]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ pkg-config ];
nativeBuildInputs = [ ]
++ lib.optional (installManPages || installShellCompletions) installShellFiles
++ lib.optional (!stdenv.hostPlatform.isDarwin) pkg-config;
buildInputs =
if stdenv.hostPlatform.isDarwin then [
Security
libiconv
] else [
openssl
];
buildInputs = [ ]
++ (if stdenv.hostPlatform.isDarwin then [ Security libiconv ] else [ openssl ])
++ lib.optional withNotmuchBackend notmuch;
# flag added because without end-to-end testing is ran which requires
# additional tooling and servers to test
cargoTestFlags = [ "--lib" ];
buildNoDefaultFeatures = true;
buildFeatures = [ ]
++ lib.optional withImapBackend "imap-backend"
++ lib.optional withNotmuchBackend "notmuch-backend"
++ lib.optional withSmtpSender "smtp-sender";
postInstall = lib.optionalString enableCompletions ''
# Install shell function
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) \
@ -50,7 +57,7 @@ rustPlatform.buildRustPackage rec {
description = "Command-line interface for email management";
homepage = "https://github.com/soywod/himalaya";
changelog = "https://github.com/soywod/himalaya/blob/v${version}/CHANGELOG.md";
license = licenses.bsdOriginal;
maintainers = with maintainers; [ toastal yanganto ];
license = licenses.mit;
maintainers = with maintainers; [ soywod toastal yanganto ];
};
}