diff options
author | Charles Strahan <charles.c.strahan@gmail.com> | 2014-12-21 23:38:13 -0500 |
---|---|---|
committer | Charles Strahan <charles.c.strahan@gmail.com> | 2014-12-24 22:48:01 -0500 |
commit | 8127edc33590cc9a156afa762b57a4151e1253c5 (patch) | |
tree | 59ffa05fa9cc59d1077eeff5d13b5d9ec76acf99 /pkgs/development/libraries/mailcore2 | |
parent | ebe75cf9c14229f797181d3644d46df587b19e16 (diff) |
mailcore2: new package
MailCore 2 provides a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. Closes #5430
Diffstat (limited to 'pkgs/development/libraries/mailcore2')
-rw-r--r-- | pkgs/development/libraries/mailcore2/default.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/development/libraries/mailcore2/default.nix b/pkgs/development/libraries/mailcore2/default.nix new file mode 100644 index 0000000000000..a2891f9207d3c --- /dev/null +++ b/pkgs/development/libraries/mailcore2/default.nix @@ -0,0 +1,55 @@ +{ stdenv, lib, fetchFromGitHub, cmake, libetpan, icu, cyrus_sasl, libctemplate +, libuchardet, pkgconfig, glib, libtidy, libxml2, libuuid, openssl +}: + +stdenv.mkDerivation rec { + name = "mailcore2-${version}"; + + version = "0.5"; + + src = fetchFromGitHub { + owner = "MailCore"; + repo = "mailcore2"; + rev = version; + sha256 = "1f2kpw8ha4j43jlimw0my9b7x1gbik7yyg1m87q6nhbbsci78qly"; + }; + + buildInputs = [ + libetpan cmake icu cyrus_sasl libctemplate libuchardet pkgconfig glib + libtidy libxml2 libuuid openssl + ]; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace "tidy/tidy.h" "tidy.h" \ + --replace "/usr/include/tidy" "${libtidy}/include" \ + --replace "/usr/include/libxml2" "${libxml2}/include/libxml2" \ + ''; + + 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"; + homepage = http://libmailcore.com; + license = licenses.bsd3; + maintainers = with maintainers; [ cstrahan ]; + }; +} |