nixpkgs/pkgs/applications/networking/remote/anydesk/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

89 lines
2.6 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, makeWrapper, makeDesktopItem, genericUpdater, writeShellScript
, atk, cairo, gdk-pixbuf, glib, gnome2, gtk2, libGLU, libGL, pango, xorg, minizip
, lsb-release, freetype, fontconfig, polkit, polkit_gnome, pciutils, copyDesktopItems
, pulseaudio }:
2017-07-13 05:59:23 +00:00
let
2018-07-08 16:03:41 +00:00
description = "Desktop sharing application, providing remote support and online meetings";
2017-07-13 05:59:23 +00:00
in stdenv.mkDerivation rec {
pname = "anydesk";
2024-04-25 20:19:16 +00:00
version = "6.3.2";
2017-07-13 05:59:23 +00:00
src = fetchurl {
urls = [
"https://download.anydesk.com/linux/anydesk-${version}-amd64.tar.gz"
"https://download.anydesk.com/linux/generic-linux/anydesk-${version}-amd64.tar.gz"
];
2024-04-25 20:19:16 +00:00
hash = "sha256-nSY4qHRsEvQk4M3JDHalAk3C6Y21WlfDQ2Gpp6/jjMs=";
2017-07-13 05:59:23 +00:00
};
2018-07-08 16:03:41 +00:00
buildInputs = [
2019-05-22 11:03:39 +00:00
atk cairo gdk-pixbuf glib gtk2 stdenv.cc.cc pango
gnome2.gtkglext libGLU libGL minizip freetype
fontconfig polkit polkit_gnome pulseaudio
2017-07-13 05:59:23 +00:00
] ++ (with xorg; [
2019-11-09 21:34:39 +00:00
libxcb libxkbfile libX11 libXdamage libXext libXfixes libXi libXmu
2019-10-01 15:27:17 +00:00
libXrandr libXtst libXt libICE libSM libXrender
2018-07-08 16:03:41 +00:00
]);
2017-07-13 05:59:23 +00:00
nativeBuildInputs = [ copyDesktopItems makeWrapper ];
desktopItems = [
(makeDesktopItem {
name = "AnyDesk";
2024-01-16 12:06:36 +00:00
exec = "anydesk %u";
icon = "anydesk";
desktopName = "AnyDesk";
genericName = description;
categories = [ "Network" ];
startupNotify = false;
})
];
2017-07-13 05:59:23 +00:00
installPhase = ''
2018-07-08 16:03:41 +00:00
runHook preInstall
mkdir -p $out/bin $out/share/{applications,doc/anydesk,icons/hicolor}
2017-07-13 05:59:23 +00:00
install -m755 anydesk $out/bin/anydesk
2019-10-01 15:27:17 +00:00
cp copyright README $out/share/doc/anydesk
2019-10-17 21:33:43 +00:00
cp -r icons/hicolor/* $out/share/icons/hicolor/
2018-07-08 16:03:41 +00:00
runHook postInstall
2017-07-13 05:59:23 +00:00
'';
postFixup = ''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
2021-01-15 13:21:58 +00:00
--set-rpath "${lib.makeLibraryPath buildInputs}" \
2017-07-13 05:59:23 +00:00
$out/bin/anydesk
# pangox is not actually necessary (it was only added as a part of gtkglext)
patchelf \
--remove-needed libpangox-1.0.so.0 \
$out/bin/anydesk
2017-07-13 05:59:23 +00:00
wrapProgram $out/bin/anydesk \
--prefix PATH : ${lib.makeBinPath [ lsb-release pciutils ]}
2017-07-13 05:59:23 +00:00
'';
passthru = {
updateScript = genericUpdater {
versionLister = writeShellScript "anydesk-versionLister" ''
curl -s https://anydesk.com/en/downloads/linux \
| grep "https://[a-z0-9._/-]*-amd64.tar.gz" -o \
| uniq \
| sed 's,.*/anydesk-\(.*\)-amd64.tar.gz,\1,g'
'';
};
};
meta = with lib; {
2018-07-08 16:03:41 +00:00
inherit description;
2020-03-04 17:41:13 +00:00
homepage = "https://www.anydesk.com";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
2017-07-13 05:59:23 +00:00
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
2023-04-12 12:10:40 +00:00
maintainers = with maintainers; [ shyim cheriimoya ];
2017-07-13 05:59:23 +00:00
};
}