Files
nixpkgs/pkgs/by-name/re/realvnc-vnc-viewer/linux.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

59 lines
1.2 KiB
Nix

{
stdenv,
fetchurl,
autoPatchelfHook,
rpmextract,
libX11,
libXext,
pname,
version,
meta,
}:
stdenv.mkDerivation (finalAttrs: {
inherit pname version;
src =
{
"x86_64-linux" = fetchurl rec {
name = "VNC-Viewer-${finalAttrs.version}-Linux-x64.rpm";
url = "https://downloads.realvnc.com/download/file/viewer.files/${name}";
hash = "sha256-fwMfQdOyLnYVfdBj80JHWT+CnKpq/9oM5oNF3aP+jgo=";
};
}
.${stdenv.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
nativeBuildInputs = [
autoPatchelfHook
rpmextract
];
buildInputs = [
libX11
libXext
stdenv.cc.cc.libgcc or null
];
unpackPhase = ''
rpmextract $src
'';
postPatch = ''
substituteInPlace ./usr/share/applications/realvnc-vncviewer.desktop \
--replace /usr/share/icons/hicolor/48x48/apps/vncviewer48x48.png vncviewer48x48.png
substituteInPlace ./usr/share/mimelnk/application/realvnc-vncviewer-mime.desktop \
--replace /usr/share/icons/hicolor/48x48/apps/vncviewer48x48.png vncviewer48x48.png
'';
installPhase = ''
runHook preInstall
mv usr $out
runHook postInstall
'';
meta = meta // {
mainProgram = "vncviewer";
};
})