2018-07-20 17:44:44 -07:00
|
|
|
{ stdenv, fetchurl, makeWrapper, makeDesktopItem
|
2019-11-10 08:44:34 -08:00
|
|
|
, atk, cairo, gdk-pixbuf, glib, gnome2, gtk2, libGLU, libGL, pango, xorg
|
2019-10-20 09:02:03 -07:00
|
|
|
, lsb-release, freetype, fontconfig, pangox_compat, polkit, polkit_gnome
|
|
|
|
, pulseaudio }:
|
2017-07-12 22:59:23 -07:00
|
|
|
|
|
|
|
let
|
|
|
|
sha256 = {
|
2019-12-07 20:43:18 -08:00
|
|
|
x86_64-linux = "1ysd8fwzm0360qs6ijr6l0y2agqb3njz20h7am1x4kxmhy8ravq9";
|
|
|
|
i386-linux = "0vjxbg5hwkqkh600rr75xviwy848r1xw9mxwf6bb6l8b0isvlsgg";
|
2019-08-13 14:52:01 -07:00
|
|
|
}.${stdenv.hostPlatform.system} or (throw "system ${stdenv.hostPlatform.system} not supported");
|
2017-07-12 22:59:23 -07:00
|
|
|
|
|
|
|
arch = {
|
2019-08-13 14:52:01 -07:00
|
|
|
x86_64-linux = "amd64";
|
2019-10-01 08:27:17 -07:00
|
|
|
i386-linux = "i386";
|
2019-08-13 14:52:01 -07:00
|
|
|
}.${stdenv.hostPlatform.system} or (throw "system ${stdenv.hostPlatform.system} not supported");
|
2017-07-12 22:59:23 -07:00
|
|
|
|
2018-07-08 09:03:41 -07:00
|
|
|
description = "Desktop sharing application, providing remote support and online meetings";
|
|
|
|
|
2019-08-13 14:52:01 -07:00
|
|
|
desktopItem = makeDesktopItem {
|
2019-10-01 08:27:17 -07:00
|
|
|
name = "AnyDesk";
|
2018-07-08 09:03:41 -07:00
|
|
|
exec = "@out@/bin/anydesk";
|
|
|
|
icon = "anydesk";
|
2019-10-01 08:27:17 -07:00
|
|
|
desktopName = "AnyDesk";
|
2018-07-08 09:03:41 -07:00
|
|
|
genericName = description;
|
|
|
|
categories = "Application;Network;";
|
|
|
|
startupNotify = "false";
|
|
|
|
};
|
|
|
|
|
2017-07-12 22:59:23 -07:00
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "anydesk";
|
2019-12-07 20:43:18 -08:00
|
|
|
version = "5.5.1";
|
2017-07-12 22:59:23 -07:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 05:41:18 -07:00
|
|
|
url = "https://download.anydesk.com/linux/${pname}-${version}-${arch}.tar.gz";
|
2017-07-12 22:59:23 -07:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2018-07-08 09:03:41 -07:00
|
|
|
buildInputs = [
|
2019-05-22 04:03:39 -07:00
|
|
|
atk cairo gdk-pixbuf glib gtk2 stdenv.cc.cc pango
|
2019-11-10 08:44:34 -08:00
|
|
|
gnome2.gtkglext libGLU libGL freetype fontconfig
|
2019-10-20 09:02:03 -07:00
|
|
|
pangox_compat polkit polkit_gnome pulseaudio
|
2017-07-12 22:59:23 -07:00
|
|
|
] ++ (with xorg; [
|
2019-11-09 13:34:39 -08:00
|
|
|
libxcb libxkbfile libX11 libXdamage libXext libXfixes libXi libXmu
|
2019-10-01 08:27:17 -07:00
|
|
|
libXrandr libXtst libXt libICE libSM libXrender
|
2018-07-08 09:03:41 -07:00
|
|
|
]);
|
2017-07-12 22:59:23 -07:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-07-08 09:03:41 -07:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin $out/share/{applications,doc/anydesk,icons/hicolor}
|
2017-07-12 22:59:23 -07:00
|
|
|
install -m755 anydesk $out/bin/anydesk
|
2019-10-01 08:27:17 -07:00
|
|
|
cp copyright README $out/share/doc/anydesk
|
2019-10-17 14:33:43 -07:00
|
|
|
cp -r icons/hicolor/* $out/share/icons/hicolor/
|
2018-07-08 09:03:41 -07:00
|
|
|
cp ${desktopItem}/share/applications/*.desktop $out/share/applications
|
|
|
|
|
|
|
|
runHook postInstall
|
2017-07-12 22:59:23 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
2018-07-08 09:03:41 -07:00
|
|
|
--set-rpath "${stdenv.lib.makeLibraryPath buildInputs}" \
|
2017-07-12 22:59:23 -07:00
|
|
|
$out/bin/anydesk
|
|
|
|
|
|
|
|
wrapProgram $out/bin/anydesk \
|
|
|
|
--prefix PATH : ${stdenv.lib.makeBinPath [ lsb-release ]}
|
2018-07-08 09:03:41 -07:00
|
|
|
|
|
|
|
substituteInPlace $out/share/applications/*.desktop \
|
|
|
|
--subst-var out
|
2017-07-12 22:59:23 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-07-08 09:03:41 -07:00
|
|
|
inherit description;
|
2019-04-10 06:30:33 -07:00
|
|
|
homepage = https://www.anydesk.com;
|
2017-07-12 22:59:23 -07:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.linux;
|
2019-10-01 08:27:17 -07:00
|
|
|
maintainers = with maintainers; [ shyim ];
|
2017-07-12 22:59:23 -07:00
|
|
|
};
|
|
|
|
}
|