notmuch: make emacs a separate output

This puts all emacs-related binaries and code to a separate output,
removing emacs from the runtime closure of neomutt.
This commit is contained in:
Florian Klink 2020-04-07 21:31:23 +02:00
parent d7b98129fe
commit d0dd8e6cca
2 changed files with 13 additions and 2 deletions

View File

@ -215,7 +215,13 @@ environment.systemPackages = [
<itemizedlist>
<listitem>
<para />
<para>
The <package>notmuch</package> package move its emacs-related binaries and
emacs lisp files to a separate output. They're not part
of the default <literal>out<literal> output anymore - if you relied on the
<literal>notmuch-emacs-mua</literal> binary or the emacs lisp files, access them via
the <literal>notmuch.emacs</literal> output.
</para>
</listitem>
</itemizedlist>
</section>

View File

@ -58,6 +58,7 @@ stdenv.mkDerivation rec {
"--zshcompletiondir=${placeholder "out"}/share/zsh/site-functions"
"--infodir=${placeholder "info"}"
] ++ optional (!withEmacs) "--without-emacs"
++ optional (withEmacs) "--emacslispdir=${placeholder "emacs"}/share/emacs/site-lisp"
++ optional (isNull ruby) "--without-ruby";
# Notmuch doesn't use autoconf and consequently doesn't tag --bindir and
@ -67,7 +68,7 @@ stdenv.mkDerivation rec {
makeFlags = [ "V=1" ];
outputs = [ "out" "man" "info" ];
outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional withEmacs "emacs";
preCheck = let
test-database = fetchurl {
@ -86,6 +87,10 @@ stdenv.mkDerivation rec {
installTargets = [ "install" "install-man" "install-info" ];
postInstall = stdenv.lib.optionalString withEmacs ''
moveToOutput bin/notmuch-emacs-mua $emacs
'';
dontGzipMan = true; # already compressed
meta = {