diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e9ecf0a3ea01..1c5635765bb4 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -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"; diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 02c6f7ec74b5..dff834d9b681 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -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: { diff --git a/pkgs/applications/networking/mailreaders/himalaya/default.nix b/pkgs/applications/networking/mailreaders/himalaya/default.nix index 52aac148df36..96b5b9bbcac4 100644 --- a/pkgs/applications/networking/mailreaders/himalaya/default.nix +++ b/pkgs/applications/networking/mailreaders/himalaya/default.nix @@ -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 ]; }; }