From 5bf69abfad9feaa47ebc5cec0c7dc1029db8fb92 Mon Sep 17 00:00:00 2001 From: Ulysses Zhan Date: Wed, 24 Sep 2025 16:54:39 -0700 Subject: [PATCH] xunlei-uos: fix build and update script --- pkgs/by-name/xu/xunlei-uos/sources.nix | 14 +++++++------- pkgs/by-name/xu/xunlei-uos/update.sh | 10 +++++++--- 2 files changed, 14 insertions(+), 10 deletions(-) mode change 100644 => 100755 pkgs/by-name/xu/xunlei-uos/update.sh diff --git a/pkgs/by-name/xu/xunlei-uos/sources.nix b/pkgs/by-name/xu/xunlei-uos/sources.nix index eb08be168268..10722a2f10ca 100644 --- a/pkgs/by-name/xu/xunlei-uos/sources.nix +++ b/pkgs/by-name/xu/xunlei-uos/sources.nix @@ -1,11 +1,11 @@ # Generated by ./update.sh - do not update manually! -# Last updated: 2025-03-19 +# Last updated: 2025-09-24 { version = "1.0.0.5"; - amd64_url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.xunlei.download/com.xunlei.download_1.0.0.5_amd64.deb"; - arm64_url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.xunlei.download/com.xunlei.download_1.0.0.5_arm64.deb"; - loongarch64_url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.xunlei.download/com.xunlei.download_1.0.0.5_loongarch64.deb"; - amd64_hash = "sha256-K+eHPmG2tT5Z+RWxigg03itw6Rcnk5MZlODqS/JtAnk="; - arm64_hash = "sha256-iA9mbp0wSe66qC5lphMTFPzmOJjzHfWKubGRPiKcVdg="; - loongarch64_hash = "sha256-44QPnB/1uWHaQkd3DBMDvYXfXwch9HywZUvg71z8fts="; + amd64_url = "https://archive2.kylinos.cn/DEB/KYLIN_DEB/pool/all/com.xunlei.download_1.0.0.5_amd64.deb"; + arm64_url = "https://archive2.kylinos.cn/DEB/KYLIN_DEB/pool/all/com.xunlei.download_1.0.0.5_arm64.deb"; + loongarch64_url = "https://archive2.kylinos.cn/DEB/KYLIN_DEB/pool/all/com.xunlei.download_1.0.0.5_loongarch64.deb"; + amd64_hash = "sha256-7558/p0iyXHdelOvNQvbFqA5kBprv8oJJv178ysoeXg="; + arm64_hash = "sha256-CciKobahdbub+dGFYy/EY3DSSP6Ge5/bZi/LDuY2MOw="; + loongarch64_hash = "sha256-X5NIwWaLbajcTJrDUbCwoFICU3gk1kHX3gGvJ/MDYhE="; } diff --git a/pkgs/by-name/xu/xunlei-uos/update.sh b/pkgs/by-name/xu/xunlei-uos/update.sh old mode 100644 new mode 100755 index 78b1769b3504..b0aa254c0c0c --- a/pkgs/by-name/xu/xunlei-uos/update.sh +++ b/pkgs/by-name/xu/xunlei-uos/update.sh @@ -1,5 +1,9 @@ #! /usr/bin/env nix-shell -#! nix-shell -i bash --pure --keep GITHUB_TOKEN -p nix git curl cacert nix-prefetch-git gzip +#! nix-shell -i bash --pure -p nix curl cacert gzip + +set -euo pipefail + +cd "$(dirname "$(readlink -f "$0")")" base_url_suffix="https://pro-store-packages.uniontech.com/appstore/dists/eagle/appstore/binary-" base_url_appendix="/Packages.gz" @@ -39,8 +43,8 @@ do } } ') - url+=("https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.xunlei.download/com.xunlei.download_"$version"_"$i".deb") - hash+=("$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $sha256sum)") + url+=("https://archive2.kylinos.cn/DEB/KYLIN_DEB/pool/all/com.xunlei.download_"$version"_"$i".deb") + hash+=("$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$(nix-prefetch-url "${url[-1]}")")") done cat >sources.nix <