about summary refs log tree commit diff
path: root/pkgs/applications/networking/mailreaders
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-04-07 21:31:23 +0200
committerFlorian Klink <flokli@flokli.de>2020-04-07 22:02:48 +0200
commitd0dd8e6cca3f4663373451b8f779cfd58a801107 (patch)
tree7b510fab2f23a84440de872d0f8957124c1c25a4 /pkgs/applications/networking/mailreaders
parentd7b98129fea1ed08a645096b16c424e3cabf77e5 (diff)
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.
Diffstat (limited to 'pkgs/applications/networking/mailreaders')
-rw-r--r--pkgs/applications/networking/mailreaders/notmuch/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix
index 4e31f2b999687..35e7a9be42777 100644
--- a/pkgs/applications/networking/mailreaders/notmuch/default.nix
+++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix
@@ -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 = {