lol

Merge pull request #304058 from jackyliu16/fix-303675

realvnc-vnc-viewer: replace fetchurl by requireFile to fix captcha

authored by

rewine and committed by
GitHub
b2cd5e15 5629a633

+24 -7
+12 -4
pkgs/tools/admin/realvnc-vnc-viewer/darwin.nix
··· 1 1 { lib 2 2 , stdenvNoCC 3 - , fetchurl 3 + , requireFile 4 4 , undmg 5 5 , pname 6 6 , version ··· 9 9 stdenvNoCC.mkDerivation (finalAttrs: { 10 10 inherit pname version meta; 11 11 12 - src = fetchurl { 13 - url = "https://downloads.realvnc.com/download/file/viewer.files/VNC-Viewer-${finalAttrs.version}-MacOSX-universal.dmg"; 14 - sha256 = "0k72fdnx1zmyi9z5n3lazc7s70gcddxq0s73akp0al0y9hzq9prh"; 12 + src = requireFile rec { 13 + name = "VNC-Viewer-${finalAttrs.version}-MacOSX-universal.dmg"; 14 + url = "https://downloads.realvnc.com/download/file/viewer.files/${name}"; 15 + sha256 = "0k72fdnx1zmyi9z5n3lazc7s70gcddxq0s73akp0al0y9hzq9prh"; 16 + message= '' 17 + vnc-viewer can be downloaded from ${url}, 18 + but the download link require captcha, thus if you wish to use this application, 19 + you need to download it manually and use follow command to add downloaded files into nix-store 20 + 21 + $ nix-prefetch-url --type sha256 file:///path/to/${name} 22 + ''; 15 23 }; 16 24 sourceRoot = "."; 17 25
+1
pkgs/tools/admin/realvnc-vnc-viewer/default.nix
··· 17 17 }; 18 18 maintainers = with maintainers; [ emilytrau onedragon ]; 19 19 platforms = [ "x86_64-linux" ] ++ platforms.darwin; 20 + hydraPlatforms = []; 20 21 mainProgram = "vncviewer"; 21 22 }; 22 23 in
+11 -3
pkgs/tools/admin/realvnc-vnc-viewer/linux.nix
··· 1 1 { lib 2 2 , stdenv 3 - , fetchurl 3 + , requireFile 4 4 , autoPatchelfHook 5 5 , rpmextract 6 6 , libX11 ··· 14 14 inherit pname version; 15 15 16 16 src = { 17 - "x86_64-linux" = fetchurl { 18 - url = "https://downloads.realvnc.com/download/file/viewer.files/VNC-Viewer-${finalAttrs.version}-Linux-x64.rpm"; 17 + "x86_64-linux" = requireFile rec { 18 + name = "VNC-Viewer-${finalAttrs.version}-Linux-x64.rpm"; 19 + url = "https://downloads.realvnc.com/download/file/viewer.files/${name}"; 19 20 sha256 = "sha256-Ull9iNi8NxB12YwEThWE0P9k1xOV2LZnebuRrVH/zwI="; 21 + message= '' 22 + vnc-viewer can be downloaded from ${url}, 23 + but the download link require captcha, thus if you wish to use this application, 24 + you need to download it manually and use follow command to add downloaded files into nix-store 25 + 26 + $ nix-prefetch-url --type sha256 file:///path/to/${name} 27 + ''; 20 28 }; 21 29 }.${stdenv.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 22 30