diff options
author | wxt <3264117476@qq.com> | 2024-08-05 22:15:41 +0800 |
---|---|---|
committer | wxt <3264117476@qq.com> | 2024-08-06 21:31:49 +0800 |
commit | dbad8d35ecfc60189bd7c1244331f90ebdc05fd9 (patch) | |
tree | 44341216aa40884007f4bdec1dc1e9e26893c282 /pkgs/applications/networking/instant-messengers/qq | |
parent | e43dc12efa8fa47dc4efb1e52f579c321dfd7e66 (diff) |
qq: 3.2.10 -> 3.2.12
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/qq')
3 files changed, 0 insertions, 161 deletions
diff --git a/pkgs/applications/networking/instant-messengers/qq/default.nix b/pkgs/applications/networking/instant-messengers/qq/default.nix deleted file mode 100644 index 0167146e57853..0000000000000 --- a/pkgs/applications/networking/instant-messengers/qq/default.nix +++ /dev/null @@ -1,121 +0,0 @@ -{ alsa-lib -, libuuid -, cups -, dpkg -, fetchurl -, glib -, libssh2 -, gtk3 -, lib -, libayatana-appindicator -, libdrm -, libgcrypt -, libkrb5 -, libnotify -, mesa # for libgbm -, libpulseaudio -, libGL -, nss -, xorg -, systemd -, stdenv -, vips -, at-spi2-core -, autoPatchelfHook -, makeShellWrapper -, wrapGAppsHook3 -, commandLineArgs ? "" -}: - -let - sources = import ./sources.nix; - srcs = { - x86_64-linux = fetchurl { - url = sources.amd64_url; - hash = sources.amd64_hash; - }; - aarch64-linux = fetchurl { - url = sources.arm64_url; - hash = sources.arm64_hash; - }; - }; - src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); -in -stdenv.mkDerivation { - pname = "qq"; - version = sources.version; - inherit src; - - nativeBuildInputs = [ - autoPatchelfHook - makeShellWrapper - wrapGAppsHook3 - dpkg - ]; - - buildInputs = [ - alsa-lib - at-spi2-core - cups - glib - gtk3 - libdrm - libpulseaudio - libgcrypt - libkrb5 - mesa - nss - vips - xorg.libXdamage - ]; - - dontWrapGApps = true; - - runtimeDependencies = map lib.getLib [ - systemd - ]; - - installPhase = '' - runHook preInstall - - mkdir -p $out/bin - cp -r opt $out/opt - cp -r usr/share $out/share - substituteInPlace $out/share/applications/qq.desktop \ - --replace "/opt/QQ/qq" "$out/bin/qq" \ - --replace "/usr/share" "$out/share" - makeShellWrapper $out/opt/QQ/qq $out/bin/qq \ - --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \ - --prefix LD_PRELOAD : "${lib.makeLibraryPath [ libssh2 ]}/libssh2.so.1" \ - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL libuuid]}" \ - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ - --add-flags ${lib.escapeShellArg commandLineArgs} \ - "''${gappsWrapperArgs[@]}" - - # Remove bundled libraries - rm -r $out/opt/QQ/resources/app/sharp-lib - - # https://aur.archlinux.org/cgit/aur.git/commit/?h=linuxqq&id=f7644776ee62fa20e5eb30d0b1ba832513c77793 - rm -r $out/opt/QQ/resources/app/libssh2.so.1 - - # https://github.com/microcai/gentoo-zh/commit/06ad5e702327adfe5604c276635ae8a373f7d29e - ln -s ${libayatana-appindicator}/lib/libayatana-appindicator3.so \ - $out/opt/QQ/libappindicator3.so - - ln -s ${libnotify}/lib/libnotify.so \ - $out/opt/QQ/libnotify.so - - runHook postInstall - ''; - - passthru.updateScript = ./update.sh; - - meta = with lib; { - homepage = "https://im.qq.com/linuxqq/"; - description = "Messaging app"; - platforms = [ "x86_64-linux" "aarch64-linux" ]; - license = licenses.unfree; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - maintainers = with lib.maintainers; [ fee1-dead bot-wxt1221 ]; - }; -} diff --git a/pkgs/applications/networking/instant-messengers/qq/sources.nix b/pkgs/applications/networking/instant-messengers/qq/sources.nix deleted file mode 100644 index a63a416a8bf03..0000000000000 --- a/pkgs/applications/networking/instant-messengers/qq/sources.nix +++ /dev/null @@ -1,9 +0,0 @@ -# Generated by ./update.sh - do not update manually! -# Last updated: 2024-06-17 -{ - version = "3.2.10"; - amd64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/944f8942/linuxqq_3.2.10-25234_amd64.deb"; - arm64_url = "https://dldir1.qq.com/qqfile/qq/QQNT/944f8942/linuxqq_3.2.10-25234_arm64.deb"; - arm64_hash = "sha256-UY9UFbwQjXBd0+52iron1LZQWP/ncUZwylrtDzm5lW8="; - amd64_hash = "sha256-CHVX5tBV/w//At2wBjLqgTzayi4NI5i06IDgyW++ha4="; -} diff --git a/pkgs/applications/networking/instant-messengers/qq/update.sh b/pkgs/applications/networking/instant-messengers/qq/update.sh deleted file mode 100755 index 777ea2a90103a..0000000000000 --- a/pkgs/applications/networking/instant-messengers/qq/update.sh +++ /dev/null @@ -1,31 +0,0 @@ -#! /usr/bin/env nix-shell -#! nix-shell -i bash --pure --keep GITHUB_TOKEN -p nix git curl cacert nix-prefetch-git jq - -set -euo pipefail - -cd $(readlink -e $(dirname "${BASH_SOURCE[0]}")) - -payload=$(curl https://im.qq.com/rainbow/linuxQQDownload | grep -oP "var params= \K\{.*\}(?=;)") -amd64_url=$(jq -r .x64DownloadUrl.deb <<< "$payload") -arm64_url=$(jq -r .armDownloadUrl.deb <<< "$payload") - -version=$(grep -oP "(?<=/QQ_).*(?=_[0-9]{6})" <<< "$amd64_url") - -amd64_hash=$(nix-prefetch-url $amd64_url) -arm64_hash=$(nix-prefetch-url $arm64_url) - -# use friendlier hashes -amd64_hash=$(nix hash to-sri --type sha256 "$amd64_hash") -arm64_hash=$(nix hash to-sri --type sha256 "$arm64_hash") - -cat >sources.nix <<EOF -# Generated by ./update.sh - do not update manually! -# Last updated: $(date +%F) -{ - version = "$version"; - amd64_url = "$amd64_url"; - arm64_url = "$arm64_url"; - arm64_hash = "$arm64_hash"; - amd64_hash = "$amd64_hash"; -} -EOF |