summary refs log tree commit diff
path: root/pkgs/applications/networking/mailreaders/notmuch-addrlookup/default.nix
blob: f5d48d03c96ae9155db6494d5625a1ffcbc10622 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ stdenv, fetchFromGitHub, pkgconfig, glib, notmuch }:

stdenv.mkDerivation rec {
  name = "notmuch-addrlookup-${version}";
  version = "7";

  src = fetchFromGitHub {
    owner = "aperezdc";
    repo = "notmuch-addrlookup-c";
    rev ="v${version}";
    sha256 = "0mz0llf1ggl1k46brgrqj3i8qlg1ycmkc5a3a0kg8fg4s1c1m6xk";
  };

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ glib notmuch ];

  # Required until notmuch-addrlookup can be compiled against notmuch >= 0.25
  patches = [ ./0001-notmuch-0.25-compatibility-fix.patch ];

  installPhase = ''
    mkdir -p "$out/bin"
    cp notmuch-addrlookup "$out/bin"
  '';

  meta = with stdenv.lib; {
    description = "Address lookup tool for Notmuch in C";
    homepage = https://github.com/aperezdc/notmuch-addrlookup-c;
    maintainers = with maintainers; [ mog garbas ];
    platforms = platforms.linux;
    license = licenses.mit;
  };
}