@@ -0,0 +1,59 @@
1+{ stdenv, fetchurl, makeWrapper
2+, cairo, gdk_pixbuf, glib, gnome2, gtk2, pango, xorg
3+, lsb-release }:
4+
5+let
6+ sha256 = {
7+ "x86_64-linux" = "0g19sac4j3m1nf400vn6qcww7prqg2p4k4zsj74i109kk1396aa2";
8+ "i686-linux" = "1dd4ai2pclav9g872xil3x67bxy32gvz9pb3w76383pcsdh5zh45";
9+ }."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
10+
11+ arch = {
12+ "x86_64-linux" = "amd64";
13+ "i686-linux" = "i686";
14+ }."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
15+
16+in stdenv.mkDerivation rec {
17+ name = "anydesk-${version}";
18+ version = "2.9.4";
19+
20+ src = fetchurl {
21+ url = "https://download.anydesk.com/linux/${name}-${arch}.tar.gz";
22+ inherit sha256;
23+ };
24+
25+ libPath = stdenv.lib.makeLibraryPath ([
26+ cairo gdk_pixbuf glib gtk2 stdenv.cc.cc pango
27+ gnome2.gtkglext
28+ ] ++ (with xorg; [
29+ libxcb libX11 libXdamage libXext libXfixes libXi
30+ libXrandr libXtst
31+ ]));
32+
33+ nativeBuildInputs = [ makeWrapper ];
34+
35+ installPhase = ''
36+ mkdir -p $out/{bin,share/icons/hicolor,share/doc/anydesk}
37+ install -m755 anydesk $out/bin/anydesk
38+ cp changelog copyright README $out/share/doc/anydesk
39+ cp -r icons/* $out/share/icons/hicolor/
40+ '';
41+
42+ postFixup = ''
43+ patchelf \
44+ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
45+ --set-rpath "${libPath}" \
46+ $out/bin/anydesk
47+
48+ wrapProgram $out/bin/anydesk \
49+ --prefix PATH : ${stdenv.lib.makeBinPath [ lsb-release ]}
50+ '';
51+
52+ meta = with stdenv.lib; {
53+ description = "Desktop sharing application, providing remote support and online meetings";
54+ homepage = http://www.anydesk.com;
55+ license = licenses.unfree;
56+ platforms = platforms.linux;
57+ maintainers = with maintainers; [ peterhoeg ];
58+ };
59+}