mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
tdlib: 1.8.38 -> 1.8.39 (#354893)
This commit is contained in:
commit
d7afffe706
@ -1,8 +1,27 @@
|
|||||||
{ fetchFromGitHub, gperf, openssl, readline, zlib, cmake, lib, stdenv }:
|
{ fetchFromGitHub, gperf, openssl, readline, zlib, cmake, lib, stdenv,
|
||||||
|
writeShellApplication, common-updater-scripts, jq }:
|
||||||
|
|
||||||
|
let
|
||||||
|
updateScript = writeShellApplication {
|
||||||
|
name = "update-tdlib";
|
||||||
|
|
||||||
|
runtimeInputs = [ jq common-updater-scripts ];
|
||||||
|
|
||||||
|
text = ''
|
||||||
|
commit_msg="^Update version to (?<v>\\\\d+.\\\\d+.\\\\d+)\\\\.$"
|
||||||
|
commit=$(curl -s "https://api.github.com/repos/tdlib/td/commits?path=CMakeLists.txt" | jq -c "map(select(.commit.message | test(\"''${commit_msg}\"))) | first")
|
||||||
|
|
||||||
|
rev=$(echo "$commit" | jq -r ".sha")
|
||||||
|
version=$(echo "$commit" | jq -r ".commit.message | capture(\"''${commit_msg}\") | .v")
|
||||||
|
|
||||||
|
update-source-version tdlib "$version" --rev="$rev"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "tdlib";
|
pname = "tdlib";
|
||||||
version = "1.8.38";
|
version = "1.8.39";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tdlib";
|
owner = "tdlib";
|
||||||
@ -11,8 +30,8 @@ stdenv.mkDerivation {
|
|||||||
# The tdlib authors do not set tags for minor versions, but
|
# The tdlib authors do not set tags for minor versions, but
|
||||||
# external programs depending on tdlib constrain the minor
|
# external programs depending on tdlib constrain the minor
|
||||||
# version, hence we set a specific commit with a known version.
|
# version, hence we set a specific commit with a known version.
|
||||||
rev = "d321984b75fccdb76239529e8aadcf7f80b0e35a";
|
rev = "056963e48fa8d3f89556239c22d6ac843d3c8a5b";
|
||||||
hash = "sha256-5QNcpwW0viWUtsW7b5oSq6X0tRyup6V5CT/BNhdv6lw=";
|
hash = "sha256-pQ+uYnyBTH4L6RW3MqAttx7K3z8fyEbzRy8JSjbBL98=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ gperf openssl readline zlib ];
|
buildInputs = [ gperf openssl readline zlib ];
|
||||||
@ -30,6 +49,8 @@ stdenv.mkDerivation {
|
|||||||
sed -i "/vptr/d" test/CMakeLists.txt
|
sed -i "/vptr/d" test/CMakeLists.txt
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.updateScript = lib.getExe updateScript;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Cross-platform library for building Telegram clients";
|
description = "Cross-platform library for building Telegram clients";
|
||||||
homepage = "https://core.telegram.org/tdlib/";
|
homepage = "https://core.telegram.org/tdlib/";
|
||||||
|
Loading…
Reference in New Issue
Block a user