2014-12-22 04:38:13 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, libetpan, icu, cyrus_sasl, libctemplate
|
2020-12-31 07:48:55 +00:00
|
|
|
, libuchardet, pkg-config, glib, html-tidy, libxml2, libuuid, openssl
|
2014-12-22 04:38:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "mailcore2";
|
2014-12-22 04:38:13 +00:00
|
|
|
|
2020-08-02 07:06:17 +01:00
|
|
|
version = "0.6.4";
|
2014-12-22 04:38:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MailCore";
|
|
|
|
repo = "mailcore2";
|
|
|
|
rev = version;
|
2020-08-02 07:06:17 +01:00
|
|
|
sha256 = "0a69q11z194fdfwyazjyyylx57sqs9j4lz7jwh5qcws8syqgb23z";
|
2014-12-22 04:38:13 +00:00
|
|
|
};
|
|
|
|
|
2020-12-31 07:48:55 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2014-12-22 04:38:13 +00:00
|
|
|
buildInputs = [
|
2020-12-31 07:48:55 +00:00
|
|
|
libetpan icu cyrus_sasl libctemplate libuchardet glib
|
2018-07-17 21:11:16 +01:00
|
|
|
html-tidy libxml2 libuuid openssl
|
2014-12-22 04:38:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
2017-03-22 13:06:43 +00:00
|
|
|
--replace " icule iculx" "" \
|
2014-12-22 04:38:13 +00:00
|
|
|
--replace "tidy/tidy.h" "tidy.h" \
|
2018-07-17 21:11:16 +01:00
|
|
|
--replace "/usr/include/tidy" "${html-tidy}/include" \
|
2015-11-29 15:50:26 +00:00
|
|
|
--replace "/usr/include/libxml2" "${libxml2.dev}/include/libxml2"
|
2015-11-29 08:33:50 +00:00
|
|
|
substituteInPlace src/core/basetypes/MCHTMLCleaner.cpp \
|
|
|
|
--replace buffio.h tidybuffio.h
|
2014-12-22 04:38:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
cp -r src/include $out
|
|
|
|
|
|
|
|
mkdir $out/lib
|
|
|
|
cp src/libMailCore.so $out/lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
|
|
|
(
|
|
|
|
cd unittest
|
|
|
|
LD_LIBRARY_PATH="$(cd ../src; pwd)" TZ=PST8PDT ./unittestcpp ../../unittest/data
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://libmailcore.com";
|
2014-12-22 04:38:13 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ cstrahan ];
|
|
|
|
};
|
|
|
|
}
|