Unverified Commit 99fd0558 authored by Lin Jian's avatar Lin Jian Committed by GitHub
Browse files

wechat-uos: fix build and 4.0.1.12 -> 4.1.0.12 (#458335)

parents 50557bb3 20d11505
Loading
Loading
Loading
Loading
+9 −34
Original line number Diff line number Diff line
@@ -43,12 +43,9 @@
  libva,
  libGL,
  libnotify,
  krb5,
  buildFHSEnv,
  writeShellScript,
  runCommandLocal,
  cacert,
  coreutils,
  curl,
}:
let
  wechat-uos-env = stdenvNoCC.mkDerivation {
@@ -125,6 +122,7 @@ let
    pulseaudio
    qt6.qt5compat
    bzip2
    krb5
  ];

  wechat =
@@ -133,37 +131,14 @@ let

      pname = "wechat-uos";
      version = sources.version;
      fetch =
      src = fetchurl (
        {
          url,
          hash,
        }:
        runCommandLocal "wechat-uos-${version}-src"
          {
            outputHashAlgo = "sha256";
            outputHash = hash;

            nativeBuildInputs = [
              curl
              coreutils
            ];

            impureEnvVars = lib.fetchers.proxyImpureEnvVars;
            SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
          curlOpts = "-A apt";
        }
          ''
            curl -A "debian APT-HTTP/1.3 (1.6.11)" --retry 3 --retry-delay 3 -L "${url}" > $out
          '';

      srcs = {
        x86_64-linux = fetch sources.amd64;
        aarch64-linux = fetch sources.arm64;
        loongarch64-linux = fetch sources.loongarch64;
      };

      src =
        srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");

        // (sources.${stdenv.hostPlatform.system}
          or (throw "Unsupported system: ${stdenv.hostPlatform.system}")
        )
      );
    in
    stdenvNoCC.mkDerivation {
      inherit pname src version;
+11 −11
Original line number Diff line number Diff line
# Generated by ./update.sh - do not update manually!
# Last updated: 2025-09-25
# Last updated: 2025-11-04
{
  version = "4.0.1.12";
  amd64 = {
    url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_4.0.1.12_amd64.deb";
    hash = "sha256-u0NbuB06my+v8yUxQ9CKSHp4nxHAcMEhVzbAozM9nQU=";
  version = "4.1.0.12";
  x86_64-linux = {
    url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_4.1.0.12_amd64.deb";
    hash = "sha256-qnu7ZPJ/xSuF8QV87y3MNkpf8FIfFR8OuPzpE2pn0LA=";
  };
  arm64 = {
    url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_4.0.1.12_arm64.deb";
    hash = "sha256-GZnIMikYS+TGvTrEl+PT7KyjmXOXXOc0PMxp3Xfpqo8=";
  aarch64-linux = {
    url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_4.1.0.12_arm64.deb";
    hash = "sha256-+XEVzVBlKZoPfTWgHjjKDLvzkGsH2Ul8m64H9Y1u7bE=";
  };
  loongarch64 = {
    url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_4.0.1.12_loongarch64.deb";
    hash = "sha256-dON2EW1+2aiiCTuBdc+IwRAmC/x2bEcQcZcar7WOfZo=";
  loongarch64-linux = {
    url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_4.1.0.12_loongarch64.deb";
    hash = "sha256-A+k/xfwWwMaDR8FT02b+TZSKn9HL6b5WC/Jkaeu6mTc=";
  };
}
+4 −4
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ hash=()
for i in amd64 arm64 loongarch64
do
    current_url=$base_url_suffix$i$base_url_appendix
    curl -A "debian APT-HTTP/1.3 (1.6.11)" -v -L -O $current_url
    curl -A "apt" -v -L -O $current_url
    current_version=$(zgrep -A 20 "Package: $target_package" "$packages_file" | awk -v pkg="$target_package" '
    BEGIN { found = 0 }
    {
@@ -48,15 +48,15 @@ cat >sources.nix <<EOF
# Last updated: $(date +%F)
{
  version = "${version[0]}";
  amd64 = {
  x86_64-linux = {
    url = "${url[0]}";
    hash = "${hash[0]}";
  };
  arm64 = {
  aarch64-linux = {
    url = "${url[1]}";
    hash = "${hash[1]}";
  };
  loongarch64 = {
  loongarch64-linux = {
    url = "${url[2]}";
    hash = "${hash[2]}";
  };