2021-02-05 17:12:51 +00:00
|
|
|
{ fetchFromGitHub, gperf, openssl, readline, zlib, cmake, lib, stdenv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tdlib";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.8.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tdlib";
|
|
|
|
repo = "td";
|
2021-12-19 01:06:50 +00:00
|
|
|
# https://github.com/tdlib/td/issues/1790
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "054a823c1a812ee3e038f702c6d8ba3e6974be9c";
|
|
|
|
sha256 = "sha256-YlvIGR3Axej0nfcGBQ5lwwYVWsLgqFrYgOxoNubYMPM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ gperf openssl readline zlib ];
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
# https://github.com/tdlib/td/issues/1974
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMake/GeneratePkgConfig.cmake \
|
|
|
|
--replace 'function(generate_pkgconfig' \
|
|
|
|
'include(GNUInstallDirs)
|
|
|
|
function(generate_pkgconfig' \
|
|
|
|
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
|
|
|
|
--replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR}
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Cross-platform library for building Telegram clients";
|
|
|
|
homepage = "https://core.telegram.org/tdlib/";
|
|
|
|
license = [ licenses.boost ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.vyorkin ];
|
|
|
|
};
|
|
|
|
}
|