nixpkgs/pkgs/development/libraries/tdlib/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
1.4 KiB
Nix
Raw Normal View History

{ fetchFromGitHub, gperf, openssl, readline, zlib, cmake, lib, stdenv }:
2019-07-14 12:42:13 +00:00
stdenv.mkDerivation rec {
pname = "tdlib";
2023-01-15 19:36:26 +00:00
version = "1.8.10";
2019-07-14 12:42:13 +00:00
src = fetchFromGitHub {
owner = "tdlib";
repo = "td";
# The tdlib authors do not set tags for minor versions, but
# external programs depending on tdlib constrain the minor
# version, hence we set a specific commit with a known version.
2023-01-15 19:36:26 +00:00
rev = "93c42f6d7c1209937431469f80427d48907f1b8d";
hash = "sha256-vdaVnC26txUBp8rlqx1CdLHlNlack3XXYdfFal1VLh4=";
2019-07-14 12:42:13 +00:00
};
buildInputs = [ gperf openssl readline zlib ];
nativeBuildInputs = [ cmake ];
2022-05-18 20:42:56 +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}
2022-10-12 17:34:25 +00:00
'' + lib.optionalString (stdenv.isDarwin && stdenv.isAarch64) ''
sed -i "/vptr/d" test/CMakeLists.txt
2022-05-18 20:42:56 +00:00
'';
meta = with lib; {
2019-07-14 12:42:13 +00:00
description = "Cross-platform library for building Telegram clients";
homepage = "https://core.telegram.org/tdlib/";
license = [ licenses.boost ];
2020-03-03 17:44:04 +00:00
platforms = platforms.unix;
2019-07-14 12:42:13 +00:00
maintainers = [ maintainers.vyorkin ];
};
}