mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
Merge pull request #34833 from flokli/notmuch-addrlookup
notmuch-addrlookup: 7 -> 9
This commit is contained in:
commit
8b5d7a5f1a
@ -1,44 +0,0 @@
|
|||||||
From a736c0dfd22cd4ab0da86c30a664c91843df1b98 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Adam Ruzicka <a.ruzicka@outlook.com>
|
|
||||||
Date: Sat, 29 Jul 2017 12:16:29 +0200
|
|
||||||
Subject: [PATCH] notmuch-0.25 compatibility fix
|
|
||||||
|
|
||||||
---
|
|
||||||
notmuch-addrlookup.c | 14 ++++++++++++++
|
|
||||||
1 file changed, 14 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/notmuch-addrlookup.c b/notmuch-addrlookup.c
|
|
||||||
index c5cf5b4..a95ded0 100644
|
|
||||||
--- a/notmuch-addrlookup.c
|
|
||||||
+++ b/notmuch-addrlookup.c
|
|
||||||
@@ -171,6 +171,13 @@ create_queries (notmuch_database_t *db,
|
|
||||||
count += tmp;
|
|
||||||
if (notmuch_query_count_messages_st (queries[1], &tmp) == NOTMUCH_STATUS_SUCCESS)
|
|
||||||
count += tmp;
|
|
||||||
+#elif LIBNOTMUCH_MAJOR_VERSION >= 5
|
|
||||||
+ unsigned int count = 0;
|
|
||||||
+ unsigned int tmp;
|
|
||||||
+ if (notmuch_query_count_messages (queries[0], &tmp) == NOTMUCH_STATUS_SUCCESS)
|
|
||||||
+ count += tmp;
|
|
||||||
+ if (notmuch_query_count_messages (queries[1], &tmp) == NOTMUCH_STATUS_SUCCESS)
|
|
||||||
+ count += tmp;
|
|
||||||
#else
|
|
||||||
unsigned int count = notmuch_query_count_messages (queries[0])
|
|
||||||
+ notmuch_query_count_messages (queries[1]);
|
|
||||||
@@ -233,6 +240,13 @@ run_queries (notmuch_database_t *db,
|
|
||||||
#if LIBNOTMUCH_MAJOR_VERSION >= 4 && LIBNOTMUCH_MINOR_VERSION >= 3
|
|
||||||
if (notmuch_query_search_messages_st (queries[i], &messages) != NOTMUCH_STATUS_SUCCESS)
|
|
||||||
continue;
|
|
||||||
+#elif LIBNOTMUCH_MAJOR_VERSION >= 5
|
|
||||||
+ unsigned int count = 0;
|
|
||||||
+ unsigned int tmp;
|
|
||||||
+ if (notmuch_query_count_messages (queries[0], &tmp) == NOTMUCH_STATUS_SUCCESS)
|
|
||||||
+ count += tmp;
|
|
||||||
+ if (notmuch_query_count_messages (queries[1], &tmp) == NOTMUCH_STATUS_SUCCESS)
|
|
||||||
+ count += tmp;
|
|
||||||
#else
|
|
||||||
if (!(messages = notmuch_query_search_messages (queries[i])))
|
|
||||||
continue;
|
|
||||||
--
|
|
||||||
2.13.3
|
|
||||||
|
|
@ -1,32 +1,28 @@
|
|||||||
{ stdenv, fetchFromGitHub, pkgconfig, glib, notmuch }:
|
{ stdenv, fetchFromGitHub, pkgconfig, glib, notmuch }:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "9";
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "notmuch-addrlookup-${version}";
|
name = "notmuch-addrlookup-${version}";
|
||||||
version = "7";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "aperezdc";
|
owner = "aperezdc";
|
||||||
repo = "notmuch-addrlookup-c";
|
repo = "notmuch-addrlookup-c";
|
||||||
rev ="v${version}";
|
rev ="v${version}";
|
||||||
sha256 = "0mz0llf1ggl1k46brgrqj3i8qlg1ycmkc5a3a0kg8fg4s1c1m6xk";
|
sha256 = "1j3zdx161i1x4w0nic14ix5i8hd501rb31daf8api0k8855sx4rc";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ glib notmuch ];
|
buildInputs = [ glib notmuch ];
|
||||||
|
|
||||||
# Required until notmuch-addrlookup can be compiled against notmuch >= 0.25
|
installPhase = "install -D notmuch-addrlookup $out/bin/notmuch-addrlookup";
|
||||||
patches = [ ./0001-notmuch-0.25-compatibility-fix.patch ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p "$out/bin"
|
|
||||||
cp notmuch-addrlookup "$out/bin"
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Address lookup tool for Notmuch in C";
|
description = "Address lookup tool for Notmuch in C";
|
||||||
homepage = https://github.com/aperezdc/notmuch-addrlookup-c;
|
homepage = https://github.com/aperezdc/notmuch-addrlookup-c;
|
||||||
maintainers = with maintainers; [ mog garbas ];
|
maintainers = with maintainers; [ mog garbas ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user