mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
{ fetchFromGitHub, gperf, openssl, readline, zlib, cmake, lib, stdenv }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "tdlib";
|
|
version = "1.8.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "tdlib";
|
|
repo = "td";
|
|
# https://github.com/tdlib/td/issues/1790
|
|
rev = "054a823c1a812ee3e038f702c6d8ba3e6974be9c";
|
|
sha256 = "sha256-YlvIGR3Axej0nfcGBQ5lwwYVWsLgqFrYgOxoNubYMPM=";
|
|
};
|
|
|
|
buildInputs = [ gperf openssl readline zlib ];
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
# 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}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Cross-platform library for building Telegram clients";
|
|
homepage = "https://core.telegram.org/tdlib/";
|
|
license = [ licenses.boost ];
|
|
platforms = platforms.unix;
|
|
maintainers = [ maintainers.vyorkin ];
|
|
};
|
|
}
|