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

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

67 lines
1.8 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, coreutils
, emacs
, glib
, gmime3
, texinfo
, xapian
}:
2012-12-25 19:59:48 +00:00
stdenv.mkDerivation rec {
pname = "mu";
version = "1.10.3";
2012-12-25 19:59:48 +00:00
2017-03-03 01:41:14 +00:00
src = fetchFromGitHub {
owner = "djcb";
repo = "mu";
rev = "v${version}";
hash = "sha256-AqIPdKdNKLnAHIlqgs8zzm7j+iwNvDFWslvp8RjQPnI=";
2012-12-25 19:59:48 +00:00
};
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
# AOT native-comp, mostly copied from pkgs/build-support/emacs/generic.nix
postInstall = lib.optionalString (emacs.nativeComp or false) ''
mkdir -p $out/share/emacs/native-lisp
export EMACSLOADPATH=$out/share/emacs/site-lisp/mu4e:
export EMACSNATIVELOADPATH=$out/share/emacs/native-lisp:
find $out/share/emacs -type f -name '*.el' -print0 \
| xargs -0 -I {} -n 1 -P $NIX_BUILD_CORES sh -c \
"emacs --batch --eval '(setq large-file-warning-threshold nil)' -f batch-native-compile {} || true"
'' + ''
emacs --batch -l package --eval "(package-generate-autoloads \"mu4e\" \"$out/share/emacs/site-lisp/mu4e\")"
'';
buildInputs = [ emacs glib gmime3 texinfo xapian ];
2017-03-03 01:41:14 +00:00
mesonFlags = [
"-Dguile=disabled"
"-Dreadline=disabled"
];
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 ];
platforms = platforms.unix;
2012-12-25 19:59:48 +00:00
};
}