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