2014-10-17 17:27:28 +01:00
|
|
|
{ fetchurl, stdenv, bash, emacs, fixDarwinDylibNames,
|
|
|
|
gdb, glib, gmime, gnupg,
|
2012-01-21 18:29:11 +00:00
|
|
|
pkgconfig, talloc, xapian
|
|
|
|
}:
|
2011-02-13 01:34:49 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-10-25 19:41:39 +01:00
|
|
|
name = "notmuch-0.18.2";
|
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-10-25 19:41:39 +01:00
|
|
|
sha256 = "175wzrw1mfpl4h72n9ims66zn5l34zn2dn857vraj2i5w7z7p7z9";
|
2011-02-13 01:34:49 +00:00
|
|
|
};
|
|
|
|
|
2014-10-17 17:27:28 +01:00
|
|
|
buildInputs = [ bash emacs gdb glib gmime gnupg pkgconfig talloc xapian ]
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];
|
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-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
|
|
|
};
|
|
|
|
}
|