nixpkgs/pkgs/tools/networking/mu/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

86 lines
2.2 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, coreutils
, emacs
, glib
, gmime3
, texinfo
, xapian
, fetchpatch
}:
2012-12-25 19:59:48 +00:00
stdenv.mkDerivation rec {
pname = "mu";
version = "1.10.7";
2012-12-25 19:59:48 +00:00
outputs = [ "out" "mu4e" ];
2017-03-03 01:41:14 +00:00
src = fetchFromGitHub {
owner = "djcb";
repo = "mu";
rev = "v${version}";
hash = "sha256-x1TsyTOK5U6/Y3QInm+XQ7T32X49iwa+4UnaHdiyqCI=";
2012-12-25 19:59:48 +00:00
};
patches = [
(fetchpatch {
name = "add-mu4e-pkg.el";
url = "https://github.com/djcb/mu/commit/00f7053d51105eea0c72151f1a8cf0b6d8478e4e.patch";
hash = "sha256-21c7djmYTcqyyygqByo9vu/GsH8WMYcq8NOAvJsS5AQ=";
})
];
postPatch = ''
# Fix mu4e-builddir (set it to $out)
substituteInPlace mu4e/mu4e-config.el.in \
--replace "@abs_top_builddir@" "$out"
2022-08-16 07:44:05 +00:00
substituteInPlace lib/utils/mu-test-utils.cc \
--replace "/bin/rm" "${coreutils}/bin/rm"
'';
2020-05-06 05:27:04 +00:00
postInstall = ''
rm --verbose $mu4e/share/emacs/site-lisp/mu4e/*.elc
'';
# move only the mu4e info manual
# this has to be after preFixup otherwise the info manual may be moved back by _multioutDocs()
# we manually move the mu4e info manual instead of setting
# outputInfo to mu4e because we do not want to move the mu-guile
# info manual (if it exists)
postFixup = ''
moveToOutput share/info/mu4e.info.gz $mu4e
install-info $mu4e/share/info/mu4e.info.gz $mu4e/share/info/dir
if [[ -a ''${!outputInfo}/share/info/mu-guile.info.gz ]]; then
install-info --delete $mu4e/share/info/mu4e.info.gz ''${!outputInfo}/share/info/dir
else
rm --verbose --recursive ''${!outputInfo}/share/info
fi
'';
buildInputs = [ emacs glib gmime3 texinfo xapian ];
2017-03-03 01:41:14 +00:00
mesonFlags = [
"-Dguile=disabled"
"-Dreadline=disabled"
"-Dlispdir=${placeholder "mu4e"}/share/emacs/site-lisp"
];
2018-02-05 13:44:54 +00:00
nativeBuildInputs = [ pkg-config meson ninja ];
2014-07-03 09:15:55 +00:00
2018-02-05 13:44:54 +00:00
doCheck = true;
meta = with lib; {
2023-05-08 17:14:54 +00:00
description = "A collection of utilities 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}";
2021-08-27 07:46:59 +00:00
maintainers = with maintainers; [ antono chvp peterhoeg ];
mainProgram = "mu";
platforms = platforms.unix;
2012-12-25 19:59:48 +00:00
};
}