2018-11-05 10:47:10 -08:00
|
|
|
{ fetchurl, stdenv
|
2016-11-20 08:55:28 -08:00
|
|
|
, pkgconfig, gnupg
|
|
|
|
, xapian, gmime, talloc, zlib
|
|
|
|
, doxygen, perl
|
2018-12-16 09:04:16 -08:00
|
|
|
, pythonPackages
|
2016-11-20 08:55:28 -08:00
|
|
|
, bash-completion
|
|
|
|
, emacs
|
|
|
|
, ruby
|
2017-08-31 17:01:42 -07:00
|
|
|
, which, dtach, openssl, bash, gdb, man
|
2012-01-21 10:29:11 -08:00
|
|
|
}:
|
2011-02-12 17:34:49 -08:00
|
|
|
|
2017-08-31 17:01:42 -07:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2011-02-12 17:34:49 -08:00
|
|
|
stdenv.mkDerivation rec {
|
2019-05-06 10:21:14 -07:00
|
|
|
version = "0.28.4"; # not really, git
|
2016-08-01 23:59:41 -07:00
|
|
|
name = "notmuch-${version}";
|
2011-02-12 17:34:49 -08:00
|
|
|
|
2015-03-30 22:36:28 -07:00
|
|
|
passthru = {
|
|
|
|
pythonSourceRoot = "${name}/bindings/python";
|
2016-08-01 23:59:41 -07:00
|
|
|
inherit version;
|
2015-03-30 22:36:28 -07:00
|
|
|
};
|
|
|
|
|
2011-09-21 13:04:43 -07:00
|
|
|
src = fetchurl {
|
2018-06-28 11:43:35 -07:00
|
|
|
url = "https://notmuchmail.org/releases/${name}.tar.gz";
|
2019-05-06 10:21:14 -07:00
|
|
|
sha256 = "1jjnhs4xs4gksvg0a9qn68rxrj41im5bh58snka2pkj20nxwmcds";
|
2011-02-12 17:34:49 -08:00
|
|
|
};
|
|
|
|
|
2017-09-14 12:24:37 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-11-20 08:55:28 -08:00
|
|
|
buildInputs = [
|
2017-09-14 12:24:37 -07:00
|
|
|
gnupg # undefined dependencies
|
2016-11-20 08:55:28 -08:00
|
|
|
xapian gmime talloc zlib # dependencies described in INSTALL
|
|
|
|
doxygen perl # (optional) api docs
|
2018-12-16 09:04:16 -08:00
|
|
|
pythonPackages.sphinx pythonPackages.python # (optional) documentation -> doc/INSTALL
|
2016-11-20 08:55:28 -08:00
|
|
|
bash-completion # (optional) dependency to install bash completion
|
2018-10-12 22:04:15 -07:00
|
|
|
emacs # (optional) to byte compile emacs code, also needed for tests
|
2016-11-20 08:55:28 -08:00
|
|
|
ruby # (optional) ruby bindings
|
2018-11-05 10:47:10 -08:00
|
|
|
];
|
2016-11-20 08:55:28 -08:00
|
|
|
|
2017-08-31 17:01:42 -07:00
|
|
|
postPatch = ''
|
2018-03-19 11:35:46 -07:00
|
|
|
patchShebangs configure
|
2018-11-05 10:47:10 -08:00
|
|
|
patchShebangs test/
|
2013-04-20 08:02:00 -07:00
|
|
|
|
|
|
|
for src in \
|
2018-01-09 17:03:48 -08:00
|
|
|
util/crypto.c \
|
2018-01-09 17:15:50 -08:00
|
|
|
notmuch-config.c
|
2013-04-20 08:02:00 -07:00
|
|
|
do
|
|
|
|
substituteInPlace "$src" \
|
2017-08-10 02:43:48 -07:00
|
|
|
--replace \"gpg\" \"${gnupg}/bin/gpg\"
|
2013-04-20 08:02:00 -07:00
|
|
|
done
|
2018-11-05 10:47:10 -08:00
|
|
|
|
|
|
|
substituteInPlace lib/Makefile.local \
|
|
|
|
--replace '-install_name $(libdir)' "-install_name $out/lib"
|
2011-04-18 10:19:44 -07:00
|
|
|
'';
|
|
|
|
|
2019-05-06 10:21:14 -07:00
|
|
|
configureFlags = [ "--zshcompletiondir=${placeholder "out"}/share/zsh/site-functions" ];
|
2018-10-12 22:17:22 -07:00
|
|
|
|
2018-02-23 20:23:58 -08:00
|
|
|
# Notmuch doesn't use autoconf and consequently doesn't tag --bindir and
|
|
|
|
# friends
|
|
|
|
setOutputFlags = false;
|
|
|
|
enableParallelBuilding = true;
|
2019-05-06 10:21:14 -07:00
|
|
|
makeFlags = [ "V=1" ];
|
2017-08-31 17:01:42 -07:00
|
|
|
|
2018-10-04 09:06:12 -07:00
|
|
|
preCheck = let
|
|
|
|
test-database = fetchurl {
|
|
|
|
url = "https://notmuchmail.org/releases/test-databases/database-v1.tar.xz";
|
|
|
|
sha256 = "1lk91s00y4qy4pjh8638b5lfkgwyl282g1m27srsf7qfn58y16a2";
|
|
|
|
};
|
|
|
|
in ''
|
|
|
|
ln -s ${test-database} test/test-databases/database-v1.tar.xz
|
|
|
|
'';
|
2018-11-05 10:47:10 -08:00
|
|
|
doCheck = !stdenv.hostPlatform.isDarwin && (versionAtLeast gmime.version "3.0");
|
|
|
|
checkTarget = "test";
|
|
|
|
checkInputs = [
|
|
|
|
which dtach openssl bash
|
|
|
|
gdb man
|
|
|
|
];
|
|
|
|
|
2019-05-06 10:21:14 -07:00
|
|
|
installTargets = [ "install" "install-man" ];
|
2017-08-31 17:01:42 -07:00
|
|
|
|
2017-02-14 06:54:10 -08:00
|
|
|
dontGzipMan = true; # already compressed
|
2011-02-12 17:34:49 -08:00
|
|
|
|
2017-08-31 17:01:42 -07:00
|
|
|
meta = {
|
2014-08-24 07:21:08 -07:00
|
|
|
description = "Mail indexer";
|
2017-04-10 07:00:25 -07:00
|
|
|
homepage = https://notmuchmail.org/;
|
|
|
|
license = licenses.gpl3;
|
2019-07-03 02:27:39 -07:00
|
|
|
maintainers = with maintainers; [ flokli the-kenny ];
|
2017-04-10 07:00:25 -07:00
|
|
|
platforms = platforms.unix;
|
2011-02-12 17:34:49 -08:00
|
|
|
};
|
|
|
|
}
|