Merge pull request #307161 from 500InternalError/qq

qq: 3.2.5-21453 -> 3.2.7 and update update.sh
This commit is contained in:
Weijia Wang 2024-04-27 13:01:21 +02:00 committed by GitHub
commit dd6d02a4f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 10 deletions

View File

@ -28,11 +28,11 @@ let
sources = import ./sources.nix;
srcs = {
x86_64-linux = fetchurl {
url = "https://dldir1.qq.com/qqfile/qq/QQNT/${sources.urlhash}/linuxqq_${sources.version}_amd64.deb";
url = sources.amd64_url;
hash = sources.amd64_hash;
};
aarch64-linux = fetchurl {
url = "https://dldir1.qq.com/qqfile/qq/QQNT/${sources.urlhash}/linuxqq_${sources.version}_arm64.deb";
url = sources.arm64_url;
hash = sources.arm64_hash;
};
};

View File

@ -1,8 +1,9 @@
# Generated by ./update.sh - do not update manually!
# Last updated: 2024-02-16
# Last updated: 2024-04-27
{
version = "3.2.5-21453";
urlhash = "852276c1";
arm64_hash = "sha256-g0J1FWG07bkabDHp2nuS48MNut2+N7gk0k5zWcmuQVw=";
amd64_hash = "sha256-6Qe4bP3q9RLEIJn9EfqqYaVTF8FRBNcjtVPl+zY7v5c=";
version = "3.2.7";
amd64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.7_240422_amd64_01.deb";
arm64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/Linux/QQ_3.2.7_240422_arm64_01.deb";
arm64_hash = "sha256-MrLkPHri3ifVy3+WNNs/CKK4Myztw8ZjWFEZDr27mpM=";
amd64_hash = "sha256-eZMzMaqCF514Wij8BZ0sLoyzjKNArLSFe92tN9WAiu0=";
}

View File

@ -9,8 +9,7 @@ payload=$(curl https://im.qq.com/rainbow/linuxQQDownload | grep -oP "var params=
amd64_url=$(jq -r .x64DownloadUrl.deb <<< "$payload")
arm64_url=$(jq -r .armDownloadUrl.deb <<< "$payload")
urlhash=$(grep -oP "(?<=QQNT/)[a-f0-9]+(?=/linuxqq)" <<< "$amd64_url")
version=$(grep -oP "(?<=/linuxqq_).*(?=_amd64.deb)" <<< "$amd64_url")
version=$(grep -oP "(?<=/QQ_).*(?=_[0-9]{6})" <<< "$amd64_url")
amd64_hash=$(nix-prefetch-url $amd64_url)
arm64_hash=$(nix-prefetch-url $arm64_url)
@ -24,7 +23,8 @@ cat >sources.nix <<EOF
# Last updated: $(date +%F)
{
version = "$version";
urlhash = "$urlhash";
amd64_url = "$amd64_url";
arm64_url = "$arm64_url";
arm64_hash = "$arm64_hash";
amd64_hash = "$amd64_hash";
}