2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, fetchurl, makeWrapper, makeDesktopItem
|
2019-05-22 13:03:39 +02:00
|
|
|
, atk, cairo, gdk-pixbuf, glib, gnome2, gtk2, libGLU_combined, pango, xorg
|
2018-12-27 23:31:09 +01:00
|
|
|
, lsb-release, freetype, fontconfig, pangox_compat, polkit, polkit_gnome }:
|
2017-07-13 07:59:23 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
sha256 = {
|
2019-08-13 23:52:01 +02:00
|
|
|
x86_64-linux = "08kdxsg9npb1nmlr2jyq7p238735kqkp7c5xckxn6rc4cp12n2y2";
|
|
|
|
i686-linux = "11r5d4234zbkkgyrd7q9x3w7s7lailnq7z4x8cnhpr8vipzrg7h2";
|
|
|
|
}.${stdenv.hostPlatform.system} or (throw "system ${stdenv.hostPlatform.system} not supported");
|
2017-07-13 07:59:23 +02:00
|
|
|
|
|
|
|
arch = {
|
2019-08-13 23:52:01 +02:00
|
|
|
x86_64-linux = "amd64";
|
|
|
|
i686-linux = "i686";
|
|
|
|
}.${stdenv.hostPlatform.system} or (throw "system ${stdenv.hostPlatform.system} not supported");
|
2017-07-13 07:59:23 +02:00
|
|
|
|
2018-07-08 18:03:41 +02:00
|
|
|
description = "Desktop sharing application, providing remote support and online meetings";
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "anydesk";
|
|
|
|
exec = "@out@/bin/anydesk";
|
|
|
|
icon = "anydesk";
|
|
|
|
desktopName = "anydesk";
|
|
|
|
genericName = description;
|
|
|
|
categories = "Application;Network;";
|
|
|
|
startupNotify = "false";
|
|
|
|
};
|
|
|
|
|
2017-07-13 07:59:23 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "anydesk";
|
2018-12-27 23:31:09 +01:00
|
|
|
version = "4.0.1";
|
2017-07-13 07:59:23 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://download.anydesk.com/linux/${pname}-${version}-${arch}.tar.gz";
|
2017-07-13 07:59:23 +02:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
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
|
2018-12-27 23:31:09 +01:00
|
|
|
gnome2.gtkglext libGLU_combined freetype fontconfig
|
|
|
|
pangox_compat polkit polkit_gnome
|
2017-07-13 07:59:23 +02:00
|
|
|
] ++ (with xorg; [
|
2018-07-08 18:03:41 +02:00
|
|
|
libxcb libX11 libXdamage libXext libXfixes libXi libXmu
|
2018-12-27 23:31:09 +01:00
|
|
|
libXrandr libXtst libXt libICE libSM
|
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
|
|
|
|
cp changelog copyright README $out/share/doc/anydesk
|
|
|
|
cp -r icons/* $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) \
|
2018-07-08 18:03:41 +02:00
|
|
|
--set-rpath "${stdenv.lib.makeLibraryPath buildInputs}" \
|
2017-07-13 07:59:23 +02:00
|
|
|
$out/bin/anydesk
|
|
|
|
|
|
|
|
wrapProgram $out/bin/anydesk \
|
|
|
|
--prefix PATH : ${stdenv.lib.makeBinPath [ lsb-release ]}
|
2018-07-08 18:03:41 +02:00
|
|
|
|
|
|
|
substituteInPlace $out/share/applications/*.desktop \
|
|
|
|
--subst-var out
|
2017-07-13 07:59:23 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-07-08 18:03:41 +02:00
|
|
|
inherit description;
|
2019-04-10 15:30:33 +02:00
|
|
|
homepage = https://www.anydesk.com;
|
2017-07-13 07:59:23 +02:00
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
|
|
|
}
|