Merge pull request #304058 from jackyliu16/fix-303675
realvnc-vnc-viewer: replace fetchurl by requireFile to fix captcha
This commit is contained in:
commit
b2cd5e15fb
3 changed files with 24 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenvNoCC
|
, stdenvNoCC
|
||||||
, fetchurl
|
, requireFile
|
||||||
, undmg
|
, undmg
|
||||||
, pname
|
, pname
|
||||||
, version
|
, version
|
||||||
|
@ -9,9 +9,17 @@
|
||||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
inherit pname version meta;
|
inherit pname version meta;
|
||||||
|
|
||||||
src = fetchurl {
|
src = requireFile rec {
|
||||||
url = "https://downloads.realvnc.com/download/file/viewer.files/VNC-Viewer-${finalAttrs.version}-MacOSX-universal.dmg";
|
name = "VNC-Viewer-${finalAttrs.version}-MacOSX-universal.dmg";
|
||||||
sha256 = "0k72fdnx1zmyi9z5n3lazc7s70gcddxq0s73akp0al0y9hzq9prh";
|
url = "https://downloads.realvnc.com/download/file/viewer.files/${name}";
|
||||||
|
sha256 = "0k72fdnx1zmyi9z5n3lazc7s70gcddxq0s73akp0al0y9hzq9prh";
|
||||||
|
message= ''
|
||||||
|
vnc-viewer can be downloaded from ${url},
|
||||||
|
but the download link require captcha, thus if you wish to use this application,
|
||||||
|
you need to download it manually and use follow command to add downloaded files into nix-store
|
||||||
|
|
||||||
|
$ nix-prefetch-url --type sha256 file:///path/to/${name}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@ let
|
||||||
};
|
};
|
||||||
maintainers = with maintainers; [ emilytrau onedragon ];
|
maintainers = with maintainers; [ emilytrau onedragon ];
|
||||||
platforms = [ "x86_64-linux" ] ++ platforms.darwin;
|
platforms = [ "x86_64-linux" ] ++ platforms.darwin;
|
||||||
|
hydraPlatforms = [];
|
||||||
mainProgram = "vncviewer";
|
mainProgram = "vncviewer";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchurl
|
, requireFile
|
||||||
, autoPatchelfHook
|
, autoPatchelfHook
|
||||||
, rpmextract
|
, rpmextract
|
||||||
, libX11
|
, libX11
|
||||||
|
@ -14,9 +14,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
|
||||||
src = {
|
src = {
|
||||||
"x86_64-linux" = fetchurl {
|
"x86_64-linux" = requireFile rec {
|
||||||
url = "https://downloads.realvnc.com/download/file/viewer.files/VNC-Viewer-${finalAttrs.version}-Linux-x64.rpm";
|
name = "VNC-Viewer-${finalAttrs.version}-Linux-x64.rpm";
|
||||||
|
url = "https://downloads.realvnc.com/download/file/viewer.files/${name}";
|
||||||
sha256 = "sha256-Ull9iNi8NxB12YwEThWE0P9k1xOV2LZnebuRrVH/zwI=";
|
sha256 = "sha256-Ull9iNi8NxB12YwEThWE0P9k1xOV2LZnebuRrVH/zwI=";
|
||||||
|
message= ''
|
||||||
|
vnc-viewer can be downloaded from ${url},
|
||||||
|
but the download link require captcha, thus if you wish to use this application,
|
||||||
|
you need to download it manually and use follow command to add downloaded files into nix-store
|
||||||
|
|
||||||
|
$ nix-prefetch-url --type sha256 file:///path/to/${name}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue