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 {
|
2014-11-15 16:58:40 +00:00
|
|
|
name = "notmuch-0.19";
|
2011-02-13 01:34:49 +00:00
|
|
|
|
2011-09-21 21:04:43 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://notmuchmail.org/releases/${name}.tar.gz";
|
2014-11-15 16:58:40 +00:00
|
|
|
sha256 = "1szf6c44g209pcjq5nvfhlp3nzcm3lrcwv4spsxmwy13hiaccvrr";
|
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 18:19:44 +01:00
|
|
|
|
|
|
|
patchPhase = ''
|
2014-10-17 17:24:27 +01:00
|
|
|
find test -type f -exec \
|
|
|
|
sed -i \
|
|
|
|
"1s_#!/usr/bin/env bash_#!${bash}/bin/bash_" \
|
|
|
|
"{}" ";"
|
2013-04-20 16:02:00 +01:00
|
|
|
|
|
|
|
for src in \
|
|
|
|
crypto.c \
|
|
|
|
emacs/notmuch-crypto.el
|
|
|
|
do
|
|
|
|
substituteInPlace "$src" \
|
|
|
|
--replace \"gpg\" \"${gnupg}/bin/gpg2\"
|
|
|
|
done
|
2011-04-18 18:19:44 +01:00
|
|
|
'';
|
|
|
|
|
2014-11-15 16:58:40 +00:00
|
|
|
postInstall = ''
|
|
|
|
make install-man
|
|
|
|
'';
|
|
|
|
|
2014-10-17 17:27:28 +01: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 15:21:08 +01: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
|
|
|
};
|
|
|
|
}
|