about summary refs log tree commit diff
path: root/pkgs/tools/networking/mu/default.nix
blob: ec5b13b34f26e8bcfb11e45f200ba98bf799bf9e (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, coreutils
, emacs
, glib
, gmime3
, texinfo
, xapian
}:

stdenv.mkDerivation rec {
  pname = "mu";
  version = "1.8.1";

  src = fetchFromGitHub {
    owner  = "djcb";
    repo   = "mu";
    rev    = "v${version}";
    sha256 = "dFYITyO9znocf9fv3eh2h83NM3RDYcpDV/uxOISChZo=";
  };

  postPatch = ''
      # Fix mu4e-builddir (set it to $out)
      substituteInPlace mu4e/mu4e-config.el.in \
        --replace "@abs_top_builddir@" "$out"
      substituteInPlace lib/utils/mu-utils.cc \
        --replace "/bin/rm" "${coreutils}/bin/rm"
    '';

  buildInputs = [ emacs glib gmime3 texinfo xapian ];

  mesonFlags = [
    "-Dguile=disabled"
    "-Dreadline=disabled"
  ];

  nativeBuildInputs = [ pkg-config meson ninja ];

  enableParallelBuilding = true;

  doCheck = true;

  meta = with lib; {
    description = "A collection of utilties for indexing and searching Maildirs";
    license = licenses.gpl3Plus;
    homepage = "https://www.djcbsoftware.nl/code/mu/";
    changelog = "https://github.com/djcb/mu/releases/tag/v${version}";
    maintainers = with maintainers; [ antono chvp peterhoeg ];
    platforms = platforms.mesaPlatforms;
  };
}