From d0dd8e6cca3f4663373451b8f779cfd58a801107 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 7 Apr 2020 21:31:23 +0200 Subject: [PATCH 1/2] 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. --- nixos/doc/manual/release-notes/rl-2009.xml | 8 +++++++- .../networking/mailreaders/notmuch/default.nix | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2009.xml b/nixos/doc/manual/release-notes/rl-2009.xml index 0d90d2b5f79..f875cef1cc3 100644 --- a/nixos/doc/manual/release-notes/rl-2009.xml +++ b/nixos/doc/manual/release-notes/rl-2009.xml @@ -215,7 +215,13 @@ environment.systemPackages = [ - + + The notmuch package move its emacs-related binaries and + emacs lisp files to a separate output. They're not part + of the default out output anymore - if you relied on the + notmuch-emacs-mua binary or the emacs lisp files, access them via + the notmuch.emacs output. + diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix index 4e31f2b9996..35e7a9be427 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 = { From 028fcf96439a9df0b4a495097f12358c1bd2b1c7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 7 Apr 2020 18:36:40 +0300 Subject: [PATCH 2/2] notmuch: remove bash-completion and just specify path --- pkgs/applications/networking/mailreaders/notmuch/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix index 35e7a9be427..e4a09ec5a16 100644 --- a/pkgs/applications/networking/mailreaders/notmuch/default.nix +++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix @@ -3,7 +3,6 @@ , xapian, gmime, talloc, zlib , doxygen, perl, texinfo , pythonPackages -, bash-completion , emacs , ruby , which, dtach, openssl, bash, gdb, man @@ -31,7 +30,6 @@ stdenv.mkDerivation rec { doxygen # (optional) api docs pythonPackages.sphinx # (optional) documentation -> doc/INSTALL texinfo # (optional) documentation -> doc/INSTALL - bash-completion # (optional) dependency to install bash completion ] ++ optional withEmacs [ emacs ]; buildInputs = [ @@ -56,6 +54,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--zshcompletiondir=${placeholder "out"}/share/zsh/site-functions" + "--bashcompletiondir=${placeholder "out"}/share/bash-completion/completions" "--infodir=${placeholder "info"}" ] ++ optional (!withEmacs) "--without-emacs" ++ optional (withEmacs) "--emacslispdir=${placeholder "emacs"}/share/emacs/site-lisp"