nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 66 lines 2.0 kB view raw
1{ 2 callPackage, 3 fetchurl, 4 lib, 5 stdenvNoCC, 6}: 7 8let 9 inherit (stdenvNoCC.hostPlatform) system; 10 11 pname = "wechat"; 12 meta = { 13 description = "Messaging and calling app"; 14 homepage = "https://www.wechat.com/en/"; 15 downloadPage = "https://linux.weixin.qq.com/en"; 16 license = lib.licenses.unfree; 17 sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; 18 maintainers = with lib.maintainers; [ prince213 ]; 19 mainProgram = "wechat"; 20 platforms = [ 21 "aarch64-darwin" 22 "x86_64-darwin" 23 "aarch64-linux" 24 "x86_64-linux" 25 ]; 26 }; 27 28 sources = 29 let 30 # https://dldir1.qq.com/weixin/mac/mac-release.xml 31 any-darwin = 32 let 33 version = "4.1.7.31-34366"; 34 version' = lib.replaceString "-" "_" version; 35 in 36 { 37 inherit version; 38 src = fetchurl { 39 url = "https://dldir1v6.qq.com/weixin/Universal/Mac/xWeChatMac_universal_${version'}.dmg"; 40 hash = "sha256-oU1qypU24wiHSdUo8H76A1hxKCDf3I3Fq/4xbNGbjDo="; 41 }; 42 }; 43 in 44 { 45 aarch64-darwin = any-darwin; 46 x86_64-darwin = any-darwin; 47 aarch64-linux = { 48 version = "4.1.0.13"; 49 src = fetchurl { 50 url = "https://web.archive.org/web/20251209092116if_/https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_arm64.AppImage"; 51 hash = "sha256-/d5crM6IGd0k0fSlBSQx4TpIVX/8iib+an0VMkWMNdw="; 52 }; 53 }; 54 x86_64-linux = { 55 version = "4.1.0.13"; 56 src = fetchurl { 57 url = "https://web.archive.org/web/20251219062558if_/https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_x86_64.AppImage"; 58 hash = "sha256-+r5Ebu40GVGG2m2lmCFQ/JkiDsN/u7XEtnLrB98602w="; 59 }; 60 }; 61 }; 62in 63callPackage (if stdenvNoCC.hostPlatform.isDarwin then ./darwin.nix else ./linux.nix) { 64 inherit pname meta; 65 inherit (sources.${system} or (throw "Unsupported system: ${system}")) version src; 66}