2021-02-06 19:27:24 +01:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, makeDesktopItem, genericUpdater, writeShellScript
|
2021-05-12 14:22:20 +02:00
|
|
|
, atk, cairo, gdk-pixbuf, glib, gnome2, gtk2, libGLU, libGL, pango, xorg, minizip
|
2021-06-07 19:41:14 +02:00
|
|
|
, lsb-release, freetype, fontconfig, polkit, polkit_gnome, pciutils
|
2019-10-20 18:02:03 +02:00
|
|
|
, pulseaudio }:
|
2017-07-13 07:59:23 +02:00
|
|
|
|
|
|
|
let
|
2018-07-08 18:03:41 +02:00
|
|
|
description = "Desktop sharing application, providing remote support and online meetings";
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
desktopItem = makeDesktopItem {
|
2019-10-01 17:27:17 +02:00
|
|
|
name = "AnyDesk";
|
2018-07-08 18:03:41 +02:00
|
|
|
exec = "@out@/bin/anydesk";
|
|
|
|
icon = "anydesk";
|
2019-10-01 17:27:17 +02:00
|
|
|
desktopName = "AnyDesk";
|
2018-07-08 18:03:41 +02:00
|
|
|
genericName = description;
|
2020-06-25 04:18:37 +02:00
|
|
|
categories = "Network;";
|
2018-07-08 18:03:41 +02:00
|
|
|
startupNotify = "false";
|
|
|
|
};
|
|
|
|
|
2017-07-13 07:59:23 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "anydesk";
|
2021-05-06 03:47:26 +02:00
|
|
|
version = "6.1.1";
|
2017-07-13 07:59:23 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-12-12 22:04:27 +01:00
|
|
|
urls = [
|
2021-01-29 21:27:28 +01:00
|
|
|
"https://download.anydesk.com/linux/${pname}-${version}-amd64.tar.gz"
|
|
|
|
"https://download.anydesk.com/linux/generic-linux/${pname}-${version}-amd64.tar.gz"
|
2019-12-12 22:04:27 +01:00
|
|
|
];
|
2021-05-06 03:47:26 +02:00
|
|
|
sha256 = "1ai58fsivb8al1279bayl800qavy0kfj40rjhf87g902ap3p4bhh";
|
2017-07-13 07:59:23 +02:00
|
|
|
};
|
|
|
|
|
2021-02-06 19:27:24 +01:00
|
|
|
passthru = {
|
|
|
|
updateScript = genericUpdater {
|
|
|
|
inherit pname version;
|
|
|
|
versionLister = writeShellScript "anydesk-versionLister" ''
|
|
|
|
echo "# Versions for $1:" >> "$2"
|
|
|
|
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'
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-07-08 18:03:41 +02:00
|
|
|
buildInputs = [
|
2019-05-22 13:03:39 +02:00
|
|
|
atk cairo gdk-pixbuf glib gtk2 stdenv.cc.cc pango
|
2021-05-12 14:22:20 +02:00
|
|
|
gnome2.gtkglext libGLU libGL minizip freetype
|
|
|
|
fontconfig polkit polkit_gnome pulseaudio
|
2017-07-13 07:59:23 +02:00
|
|
|
] ++ (with xorg; [
|
2019-11-09 22:34:39 +01:00
|
|
|
libxcb libxkbfile libX11 libXdamage libXext libXfixes libXi libXmu
|
2019-10-01 17:27:17 +02:00
|
|
|
libXrandr libXtst libXt libICE libSM libXrender
|
2018-07-08 18:03:41 +02:00
|
|
|
]);
|
2017-07-13 07:59:23 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-07-08 18:03:41 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin $out/share/{applications,doc/anydesk,icons/hicolor}
|
2017-07-13 07:59:23 +02:00
|
|
|
install -m755 anydesk $out/bin/anydesk
|
2019-10-01 17:27:17 +02:00
|
|
|
cp copyright README $out/share/doc/anydesk
|
2019-10-17 23:33:43 +02:00
|
|
|
cp -r icons/hicolor/* $out/share/icons/hicolor/
|
2018-07-08 18:03:41 +02:00
|
|
|
cp ${desktopItem}/share/applications/*.desktop $out/share/applications
|
|
|
|
|
|
|
|
runHook postInstall
|
2017-07-13 07:59:23 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
2021-01-15 14:21:58 +01:00
|
|
|
--set-rpath "${lib.makeLibraryPath buildInputs}" \
|
2017-07-13 07:59:23 +02:00
|
|
|
$out/bin/anydesk
|
|
|
|
|
2019-12-24 15:59:35 +01:00
|
|
|
# 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 07:59:23 +02:00
|
|
|
wrapProgram $out/bin/anydesk \
|
2021-06-07 19:41:14 +02:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ lsb-release pciutils ]}
|
2018-07-08 18:03:41 +02:00
|
|
|
|
|
|
|
substituteInPlace $out/share/applications/*.desktop \
|
|
|
|
--subst-var out
|
2017-07-13 07:59:23 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-07-08 18:03:41 +02:00
|
|
|
inherit description;
|
2020-03-04 18:41:13 +01:00
|
|
|
homepage = "https://www.anydesk.com";
|
2017-07-13 07:59:23 +02:00
|
|
|
license = licenses.unfree;
|
2021-01-29 21:27:28 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2019-10-01 17:27:17 +02:00
|
|
|
maintainers = with maintainers; [ shyim ];
|
2017-07-13 07:59:23 +02:00
|
|
|
};
|
|
|
|
}
|