2014-11-15 16:58:40 +00:00
|
|
|
{ fetchurl, stdenv, bash, emacs, fixDarwinDylibNames
|
|
|
|
, gdb, glib, gmime, gnupg
|
|
|
|
, pkgconfig, talloc, xapian
|
|
|
|
, sphinx, python
|
2012-01-21 18:29:11 +00:00
|
|
|
}:
|
2011-02-13 01:34:49 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-07-06 15:37:15 +00:00
|
|
|
name = "notmuch-0.20.2";
|
2011-02-13 01:34:49 +00:00
|
|
|
|
2015-03-31 05:36:28 +00:00
|
|
|
passthru = {
|
|
|
|
pythonSourceRoot = "${name}/bindings/python";
|
|
|
|
};
|
|
|
|
|
2011-09-21 20:04:43 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://notmuchmail.org/releases/${name}.tar.gz";
|
2015-07-06 15:37:15 +00:00
|
|
|
sha256 = "1v5dcnlg4km5hfaq0i0qywq5fn66fi0rq4aaibyqkwxz8mis4hgp";
|
2011-02-13 01:34:49 +00:00
|
|
|
};
|
|
|
|
|
2015-01-02 20:39:09 +00:00
|
|
|
buildInputs = [ bash emacs glib gmime gnupg pkgconfig talloc xapian sphinx python ]
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames
|
|
|
|
++ stdenv.lib.optional (!stdenv.isDarwin) gdb;
|
2011-04-18 17:19:44 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
2014-10-17 16:24:27 +00:00
|
|
|
find test -type f -exec \
|
|
|
|
sed -i \
|
|
|
|
"1s_#!/usr/bin/env bash_#!${bash}/bin/bash_" \
|
|
|
|
"{}" ";"
|
2013-04-20 15:02:00 +00:00
|
|
|
|
|
|
|
for src in \
|
|
|
|
crypto.c \
|
|
|
|
emacs/notmuch-crypto.el
|
|
|
|
do
|
|
|
|
substituteInPlace "$src" \
|
|
|
|
--replace \"gpg\" \"${gnupg}/bin/gpg2\"
|
|
|
|
done
|
2011-04-18 17:19:44 +00:00
|
|
|
'';
|
|
|
|
|
2014-11-15 16:58:40 +00:00
|
|
|
postInstall = ''
|
|
|
|
make install-man
|
|
|
|
'';
|
|
|
|
|
2014-10-17 16:27:28 +00:00
|
|
|
preFixup = if stdenv.isDarwin then
|
|
|
|
''
|
|
|
|
prg="$out/bin/notmuch"
|
|
|
|
target="libnotmuch.3.dylib"
|
|
|
|
echo "$prg: fixing link to $target"
|
|
|
|
install_name_tool -change "$target" "$out/lib/$target" "$prg"
|
|
|
|
''
|
|
|
|
else
|
|
|
|
"";
|
|
|
|
|
2012-01-21 18:29:11 +00:00
|
|
|
# XXX: emacs tests broken
|
2012-02-07 17:39:59 +00:00
|
|
|
doCheck = false;
|
|
|
|
checkTarget = "test";
|
2011-02-13 01:34:49 +00:00
|
|
|
|
|
|
|
meta = {
|
2014-08-24 14:21:08 +00:00
|
|
|
description = "Mail indexer";
|
2011-11-20 21:49:06 +00:00
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2013-02-19 03:46:47 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ chaoflow garbas ];
|
2012-01-21 18:29:11 +00:00
|
|
|
platforms = stdenv.lib.platforms.gnu;
|
2011-02-13 01:34:49 +00:00
|
|
|
};
|
|
|
|
}
|