forked from mirrors/nixpkgs
Merge pull request #84008 from mredaelli/notmuch
notmuch: extract optional dependencies
This commit is contained in:
commit
ed3ec0be54
|
@ -1,12 +1,13 @@
|
||||||
{ fetchurl, stdenv
|
{ fetchurl, stdenv
|
||||||
, pkgconfig, gnupg
|
, pkgconfig, gnupg
|
||||||
, xapian, gmime, talloc, zlib
|
, xapian, gmime, talloc, zlib
|
||||||
, doxygen, perl
|
, doxygen, perl, texinfo
|
||||||
, pythonPackages
|
, pythonPackages
|
||||||
, bash-completion
|
, bash-completion
|
||||||
, emacs
|
, emacs
|
||||||
, ruby
|
, ruby
|
||||||
, which, dtach, openssl, bash, gdb, man
|
, which, dtach, openssl, bash, gdb, man
|
||||||
|
, withEmacs ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
@ -25,15 +26,20 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0dfwa38vgnxk9cvvpza66szjgp8lir6iz6yy0cry9593lywh9xym";
|
sha256 = "0dfwa38vgnxk9cvvpza66szjgp8lir6iz6yy0cry9593lywh9xym";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [
|
||||||
|
pkgconfig
|
||||||
|
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 = [
|
buildInputs = [
|
||||||
gnupg # undefined dependencies
|
gnupg # undefined dependencies
|
||||||
xapian gmime talloc zlib # dependencies described in INSTALL
|
xapian gmime talloc zlib # dependencies described in INSTALL
|
||||||
doxygen perl # (optional) api docs
|
perl
|
||||||
pythonPackages.sphinx pythonPackages.python # (optional) documentation -> doc/INSTALL
|
pythonPackages.python
|
||||||
bash-completion # (optional) dependency to install bash completion
|
ruby
|
||||||
emacs # (optional) to byte compile emacs code, also needed for tests
|
|
||||||
ruby # (optional) ruby bindings
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -42,13 +48,17 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
substituteInPlace lib/Makefile.local \
|
substituteInPlace lib/Makefile.local \
|
||||||
--replace '-install_name $(libdir)' "-install_name $out/lib"
|
--replace '-install_name $(libdir)' "-install_name $out/lib"
|
||||||
|
'' + optionalString withEmacs ''
|
||||||
substituteInPlace emacs/notmuch-emacs-mua \
|
substituteInPlace emacs/notmuch-emacs-mua \
|
||||||
--replace 'EMACS:-emacs' 'EMACS:-${emacs}/bin/emacs' \
|
--replace 'EMACS:-emacs' 'EMACS:-${emacs}/bin/emacs' \
|
||||||
--replace 'EMACSCLIENT:-emacsclient' 'EMACSCLIENT:-${emacs}/bin/emacsclient'
|
--replace 'EMACSCLIENT:-emacsclient' 'EMACSCLIENT:-${emacs}/bin/emacsclient'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = [ "--zshcompletiondir=${placeholder "out"}/share/zsh/site-functions" ];
|
configureFlags = [
|
||||||
|
"--zshcompletiondir=${placeholder "out"}/share/zsh/site-functions"
|
||||||
|
"--infodir=${placeholder "info"}"
|
||||||
|
] ++ optional (!withEmacs) "--without-emacs"
|
||||||
|
++ optional (isNull ruby) "--without-ruby";
|
||||||
|
|
||||||
# Notmuch doesn't use autoconf and consequently doesn't tag --bindir and
|
# Notmuch doesn't use autoconf and consequently doesn't tag --bindir and
|
||||||
# friends
|
# friends
|
||||||
|
@ -56,6 +66,9 @@ stdenv.mkDerivation rec {
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
makeFlags = [ "V=1" ];
|
makeFlags = [ "V=1" ];
|
||||||
|
|
||||||
|
|
||||||
|
outputs = [ "out" "man" "info" ];
|
||||||
|
|
||||||
preCheck = let
|
preCheck = let
|
||||||
test-database = fetchurl {
|
test-database = fetchurl {
|
||||||
url = "https://notmuchmail.org/releases/test-databases/database-v1.tar.xz";
|
url = "https://notmuchmail.org/releases/test-databases/database-v1.tar.xz";
|
||||||
|
@ -68,10 +81,10 @@ stdenv.mkDerivation rec {
|
||||||
checkTarget = "test";
|
checkTarget = "test";
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
which dtach openssl bash
|
which dtach openssl bash
|
||||||
gdb man
|
gdb man emacs
|
||||||
];
|
];
|
||||||
|
|
||||||
installTargets = [ "install" "install-man" ];
|
installTargets = [ "install" "install-man" "install-info" ];
|
||||||
|
|
||||||
dontGzipMan = true; # already compressed
|
dontGzipMan = true; # already compressed
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue