2022-06-25 14:31:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2024-02-24 14:56:45 +00:00
|
|
|
, glibcLocales
|
2022-06-25 14:31:08 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2024-02-24 14:56:45 +00:00
|
|
|
, python3
|
|
|
|
, cld2
|
2022-06-25 14:31:08 +00:00
|
|
|
, coreutils
|
|
|
|
, emacs
|
|
|
|
, glib
|
|
|
|
, gmime3
|
|
|
|
, texinfo
|
|
|
|
, xapian
|
|
|
|
}:
|
2012-12-25 19:59:48 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "mu";
|
2024-05-04 04:06:46 +00:00
|
|
|
version = "1.12.5";
|
2012-12-25 19:59:48 +00:00
|
|
|
|
2023-09-03 17:12:20 +00:00
|
|
|
outputs = [ "out" "mu4e" ];
|
|
|
|
|
2017-03-03 01:41:14 +00:00
|
|
|
src = fetchFromGitHub {
|
2022-06-27 03:54:46 +00:00
|
|
|
owner = "djcb";
|
|
|
|
repo = "mu";
|
|
|
|
rev = "v${version}";
|
2024-05-04 04:06:46 +00:00
|
|
|
hash = "sha256-dQeXL+CcysmlV6VYSuZtWGSgIhoqP6Y20Qora4l0iP8=";
|
2012-12-25 19:59:48 +00:00
|
|
|
};
|
|
|
|
|
2022-06-25 14:31:08 +00:00
|
|
|
postPatch = ''
|
2024-02-24 14:56:45 +00:00
|
|
|
substituteInPlace lib/utils/mu-utils-file.cc \
|
|
|
|
--replace-fail "/bin/rm" "${coreutils}/bin/rm"
|
|
|
|
substituteInPlace lib/tests/bench-indexer.cc \
|
|
|
|
--replace-fail "/bin/rm" "${coreutils}/bin/rm"
|
|
|
|
substituteInPlace lib/mu-maildir.cc \
|
|
|
|
--replace-fail "/bin/mv" "${coreutils}/bin/mv"
|
|
|
|
patchShebangs build-aux/date.py
|
2022-06-27 03:54:46 +00:00
|
|
|
'';
|
2020-05-06 05:27:04 +00:00
|
|
|
|
2023-09-03 17:16:20 +00:00
|
|
|
postInstall = ''
|
|
|
|
rm --verbose $mu4e/share/emacs/site-lisp/mu4e/*.elc
|
2023-09-03 17:12:20 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# 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
|
2022-10-03 19:55:32 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-24 14:56:45 +00:00
|
|
|
buildInputs = [ cld2 emacs glib gmime3 texinfo xapian ];
|
2017-03-03 01:41:14 +00:00
|
|
|
|
2022-06-25 14:31:08 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dguile=disabled"
|
|
|
|
"-Dreadline=disabled"
|
2023-09-03 17:12:20 +00:00
|
|
|
"-Dlispdir=${placeholder "mu4e"}/share/emacs/site-lisp"
|
2022-06-25 14:31:08 +00:00
|
|
|
];
|
2018-02-05 13:44:54 +00:00
|
|
|
|
2024-02-24 14:56:45 +00:00
|
|
|
nativeBuildInputs = [ pkg-config meson ninja python3 glibcLocales ];
|
2014-07-03 09:15:55 +00:00
|
|
|
|
2018-02-05 13:44:54 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2024-02-24 14:56:45 +00:00
|
|
|
# Tests need a UTF-8 aware locale configured
|
|
|
|
env.LANG = "C.UTF-8";
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2023-05-08 17:14:54 +00:00
|
|
|
description = "A collection of utilities for indexing and searching Maildirs";
|
2015-09-24 08:38:43 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.djcbsoftware.nl/code/mu/";
|
2022-06-25 14:31:08 +00:00
|
|
|
changelog = "https://github.com/djcb/mu/releases/tag/v${version}";
|
2021-08-27 07:46:59 +00:00
|
|
|
maintainers = with maintainers; [ antono chvp peterhoeg ];
|
2023-08-09 19:33:34 +00:00
|
|
|
mainProgram = "mu";
|
2022-06-27 03:54:46 +00:00
|
|
|
platforms = platforms.unix;
|
2012-12-25 19:59:48 +00:00
|
|
|
};
|
|
|
|
}
|