forked from mirrors/nixpkgs
anydesk: fix application shortcut
This commit is contained in:
parent
fda46a645c
commit
be3ee6f440
|
@ -1,5 +1,5 @@
|
||||||
{ stdenv, fetchurl, makeWrapper
|
{ stdenv, fetchurl, autoPatchelfHook, makeWrapper, makeDesktopItem
|
||||||
, cairo, gdk_pixbuf, glib, gnome2, gtk2, pango, xorg
|
, atk, cairo, freetype, gdk_pixbuf, glib, gnome2, gtk2, libGLU_combined, pango, xorg
|
||||||
, lsb-release }:
|
, lsb-release }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -13,6 +13,18 @@ let
|
||||||
"i686-linux" = "i686";
|
"i686-linux" = "i686";
|
||||||
}."${stdenv.system}" or (throw "system ${stdenv.system} not supported");
|
}."${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 {
|
in stdenv.mkDerivation rec {
|
||||||
name = "anydesk-${version}";
|
name = "anydesk-${version}";
|
||||||
version = "2.9.4";
|
version = "2.9.4";
|
||||||
|
@ -22,35 +34,43 @@ in stdenv.mkDerivation rec {
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
libPath = stdenv.lib.makeLibraryPath ([
|
buildInputs = [
|
||||||
cairo gdk_pixbuf glib gtk2 stdenv.cc.cc pango
|
atk cairo gdk_pixbuf glib gtk2 stdenv.cc.cc pango
|
||||||
gnome2.gtkglext
|
gnome2.gtkglext libGLU_combined
|
||||||
] ++ (with xorg; [
|
] ++ (with xorg; [
|
||||||
libxcb libX11 libXdamage libXext libXfixes libXi
|
libxcb libX11 libXdamage libXext libXfixes libXi libXmu
|
||||||
libXrandr libXtst
|
libXrandr libXtst
|
||||||
]));
|
]);
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
installPhase = ''
|
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
|
install -m755 anydesk $out/bin/anydesk
|
||||||
cp changelog copyright README $out/share/doc/anydesk
|
cp changelog copyright README $out/share/doc/anydesk
|
||||||
cp -r icons/* $out/share/icons/hicolor/
|
cp -r icons/* $out/share/icons/hicolor/
|
||||||
|
cp ${desktopItem}/share/applications/*.desktop $out/share/applications
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
patchelf \
|
patchelf \
|
||||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||||
--set-rpath "${libPath}" \
|
--set-rpath "${stdenv.lib.makeLibraryPath buildInputs}" \
|
||||||
$out/bin/anydesk
|
$out/bin/anydesk
|
||||||
|
|
||||||
wrapProgram $out/bin/anydesk \
|
wrapProgram $out/bin/anydesk \
|
||||||
--prefix PATH : ${stdenv.lib.makeBinPath [ lsb-release ]}
|
--prefix PATH : ${stdenv.lib.makeBinPath [ lsb-release ]}
|
||||||
|
|
||||||
|
substituteInPlace $out/share/applications/*.desktop \
|
||||||
|
--subst-var out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Desktop sharing application, providing remote support and online meetings";
|
inherit description;
|
||||||
homepage = http://www.anydesk.com;
|
homepage = http://www.anydesk.com;
|
||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
|
Loading…
Reference in a new issue