diff options
author | Peter Hoeg <peter@hoeg.com> | 2018-07-09 00:03:41 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2018-07-09 00:03:41 +0800 |
commit | be3ee6f44071ebe7ed4b5027a816a1d731f61fd5 (patch) | |
tree | c96513e5823b90f9cad5c727dc3bbcf14c012735 /pkgs/applications | |
parent | fda46a645c962a7ae01680a0a0e290a6f0b5de1b (diff) | |
download | nixlib-be3ee6f44071ebe7ed4b5027a816a1d731f61fd5.tar nixlib-be3ee6f44071ebe7ed4b5027a816a1d731f61fd5.tar.gz nixlib-be3ee6f44071ebe7ed4b5027a816a1d731f61fd5.tar.bz2 nixlib-be3ee6f44071ebe7ed4b5027a816a1d731f61fd5.tar.lz nixlib-be3ee6f44071ebe7ed4b5027a816a1d731f61fd5.tar.xz nixlib-be3ee6f44071ebe7ed4b5027a816a1d731f61fd5.tar.zst nixlib-be3ee6f44071ebe7ed4b5027a816a1d731f61fd5.zip |
anydesk: fix application shortcut
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/networking/remote/anydesk/default.nix | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/pkgs/applications/networking/remote/anydesk/default.nix b/pkgs/applications/networking/remote/anydesk/default.nix index a6858a7b5fdf..19e85a9711d1 100644 --- a/pkgs/applications/networking/remote/anydesk/default.nix +++ b/pkgs/applications/networking/remote/anydesk/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, makeWrapper -, cairo, gdk_pixbuf, glib, gnome2, gtk2, pango, xorg +{ stdenv, fetchurl, autoPatchelfHook, makeWrapper, makeDesktopItem +, atk, cairo, freetype, gdk_pixbuf, glib, gnome2, gtk2, libGLU_combined, pango, xorg , lsb-release }: let @@ -13,6 +13,18 @@ let "i686-linux" = "i686"; }."${stdenv.system}" or (throw "system ${stdenv.system} not supported"); + 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"; + }; + in stdenv.mkDerivation rec { name = "anydesk-${version}"; version = "2.9.4"; @@ -22,35 +34,43 @@ in stdenv.mkDerivation rec { inherit sha256; }; - libPath = stdenv.lib.makeLibraryPath ([ - cairo gdk_pixbuf glib gtk2 stdenv.cc.cc pango - gnome2.gtkglext + buildInputs = [ + atk cairo gdk_pixbuf glib gtk2 stdenv.cc.cc pango + gnome2.gtkglext libGLU_combined ] ++ (with xorg; [ - libxcb libX11 libXdamage libXext libXfixes libXi + libxcb libX11 libXdamage libXext libXfixes libXi libXmu libXrandr libXtst - ])); + ]); nativeBuildInputs = [ makeWrapper ]; installPhase = '' - mkdir -p $out/{bin,share/icons/hicolor,share/doc/anydesk} + runHook preInstall + + mkdir -p $out/bin $out/share/{applications,doc/anydesk,icons/hicolor} install -m755 anydesk $out/bin/anydesk cp changelog copyright README $out/share/doc/anydesk cp -r icons/* $out/share/icons/hicolor/ + cp ${desktopItem}/share/applications/*.desktop $out/share/applications + + runHook postInstall ''; postFixup = '' patchelf \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - --set-rpath "${libPath}" \ + --set-rpath "${stdenv.lib.makeLibraryPath buildInputs}" \ $out/bin/anydesk wrapProgram $out/bin/anydesk \ --prefix PATH : ${stdenv.lib.makeBinPath [ lsb-release ]} + + substituteInPlace $out/share/applications/*.desktop \ + --subst-var out ''; meta = with stdenv.lib; { - description = "Desktop sharing application, providing remote support and online meetings"; + inherit description; homepage = http://www.anydesk.com; license = licenses.unfree; platforms = platforms.linux; |