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