about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2023-03-24 10:19:07 +0100
committerGitHub <noreply@github.com>2023-03-24 10:19:07 +0100
commit4f9bedb8d30d719d988d686cb46cdb1b168290c7 (patch)
tree3d7cf48f4353c7ec959a4ed971be03f20551dfaf
parent6c79e12046ff30bea832b02fd50410da8e05b23b (diff)
parent69978dcb2ac037329999747b9105b91031b30084 (diff)
Merge pull request #215330 from soywod/master
himalaya: 0.6.0 -> 0.7.1
-rw-r--r--maintainers/maintainer-list.nix10
-rw-r--r--pkgs/applications/editors/vim/plugins/overrides.nix14
-rw-r--r--pkgs/applications/networking/mailreaders/himalaya/default.nix47
3 files changed, 45 insertions, 26 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index e9ecf0a3ea014..1c5635765bb4d 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 02c6f7ec74b51..dff834d9b6814 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 52aac148df36a..96b5b9bbcac48 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 ];
   };
 }