mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
81b9cc6f54
- the original project has been unmaintained for years - some dependants needed to be patched due to renamed headers https://github.com/htacg/tidy-html5/issues/326#issuecomment-160329114 - separate tidy-html5 package was removed, as since the 5.0.0 version it's meant as a successor to both, and library name got back from libtidy5.so to libtidy.so https://github.com/htacg/tidy-html5/issues/326#issuecomment-160314666 /cc committers to tidy-html5: @edwjto and @zimbatm.
58 lines
1.4 KiB
Nix
58 lines
1.4 KiB
Nix
{ 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.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "MailCore";
|
|
repo = "mailcore2";
|
|
rev = version;
|
|
sha256 = "1k0l59cdk8np4pff1my07dp7ivf3nchlhcpvm9xizp0my9rqgbxb";
|
|
};
|
|
|
|
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"
|
|
substituteInPlace src/core/basetypes/MCHTMLCleaner.cpp \
|
|
--replace buffio.h tidybuffio.h
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|