nixpkgs/pkgs/by-name/an/anydesk/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

89 lines
2.7 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, makeWrapper, makeDesktopItem, genericUpdater, writeShellScript
, atk, cairo, gdk-pixbuf, glib, gnome2, gtk2, libGLU, libGL, pango, xorg, minizip
, lsb-release, freetype, fontconfig, polkit, polkit_gnome, pciutils, copyDesktopItems
, pulseaudio }:
2017-07-13 05:59:23 +00:00
let
2018-07-08 16:03:41 +00:00
description = "Desktop sharing application, providing remote support and online meetings";
in stdenv.mkDerivation (finalAttrs: {
pname = "anydesk";
2024-09-26 21:14:09 +00:00
version = "6.3.3";
2017-07-13 05:59:23 +00:00
src = fetchurl {
urls = [
"https://download.anydesk.com/linux/anydesk-${finalAttrs.version}-amd64.tar.gz"
"https://download.anydesk.com/linux/generic-linux/anydesk-${finalAttrs.version}-amd64.tar.gz"
];
2024-09-26 21:14:09 +00:00
hash = "sha256-uSotkFOpuC2a2sRTagY9KFx3F2VJmgrsn+dBa5ycdck=";
2017-07-13 05:59:23 +00:00
};
2018-07-08 16:03:41 +00:00
buildInputs = [
2019-05-22 11:03:39 +00:00
atk cairo gdk-pixbuf glib gtk2 stdenv.cc.cc pango
gnome2.gtkglext libGLU libGL minizip freetype
fontconfig polkit polkit_gnome pulseaudio
2017-07-13 05:59:23 +00:00
] ++ (with xorg; [
2019-11-09 21:34:39 +00:00
libxcb libxkbfile libX11 libXdamage libXext libXfixes libXi libXmu
2019-10-01 15:27:17 +00:00
libXrandr libXtst libXt libICE libSM libXrender
2018-07-08 16:03:41 +00:00
]);
2017-07-13 05:59:23 +00:00
nativeBuildInputs = [ copyDesktopItems makeWrapper ];
desktopItems = [
(makeDesktopItem {
name = "AnyDesk";
2024-01-16 12:06:36 +00:00
exec = "anydesk %u";
icon = "anydesk";
desktopName = "AnyDesk";
genericName = description;
categories = [ "Network" ];
startupNotify = false;
})
];
2017-07-13 05:59:23 +00:00
installPhase = ''
2018-07-08 16:03:41 +00:00
runHook preInstall
mkdir -p $out/bin $out/share/{applications,doc/anydesk,icons/hicolor}
2017-07-13 05:59:23 +00:00
install -m755 anydesk $out/bin/anydesk
2019-10-01 15:27:17 +00:00
cp copyright README $out/share/doc/anydesk
2019-10-17 21:33:43 +00:00
cp -r icons/hicolor/* $out/share/icons/hicolor/
2018-07-08 16:03:41 +00:00
runHook postInstall
2017-07-13 05:59:23 +00:00
'';
postFixup = ''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath "${lib.makeLibraryPath finalAttrs.buildInputs}" \
2017-07-13 05:59:23 +00:00
$out/bin/anydesk
# pangox is not actually necessary (it was only added as a part of gtkglext)
patchelf \
--remove-needed libpangox-1.0.so.0 \
$out/bin/anydesk
2017-07-13 05:59:23 +00:00
wrapProgram $out/bin/anydesk \
--prefix PATH : ${lib.makeBinPath [ lsb-release pciutils ]}
2017-07-13 05:59:23 +00:00
'';
passthru = {
updateScript = genericUpdater {
versionLister = writeShellScript "anydesk-versionLister" ''
curl -s https://anydesk.com/en/downloads/linux \
| grep "https://[a-z0-9._/-]*-amd64.tar.gz" -o \
| uniq \
| sed 's,.*/anydesk-\(.*\)-amd64.tar.gz,\1,g'
'';
};
};
meta = {
2018-07-08 16:03:41 +00:00
inherit description;
2020-03-04 17:41:13 +00:00
homepage = "https://www.anydesk.com";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ shyim cheriimoya ];
2017-07-13 05:59:23 +00:00
};
})