Files

115 lines
2.1 KiB
Nix

{
lib,
stdenv,
fetchurl,
dpkg,
autoPatchelfHook,
makeWrapper,
gtk3,
cacert,
libsecret,
vte,
libxcrypt,
libxcrypt-legacy,
webkitgtk_4_1,
libsoup_3,
lttng-ust_2_12,
icu,
dotnet-runtime_8,
wayland,
libxkbcommon,
libGL,
alsa-lib,
pcsclite,
glib,
fontconfig,
openssl,
libusb1,
libx11,
libice,
libsm,
libxext,
libxcursor,
libxi,
libxrandr,
}:
stdenv.mkDerivation rec {
pname = "remote-desktop-manager";
version = "2026.2.0.6";
src = fetchurl {
url = "https://cdn.devolutions.net/download/Linux/RDM/${version}/RemoteDesktopManager_${version}_amd64.deb";
sha256 = "sha256-eMz84IHV+w//7LOAo6b9WQfh7Cy/qaQOsfK+2q+nRJg=";
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
makeWrapper
];
buildInputs = [
gtk3
cacert
libsecret
vte
libxcrypt
libxcrypt-legacy
lttng-ust_2_12
icu
dotnet-runtime_8
wayland
libxkbcommon
libGL
alsa-lib
pcsclite
libsoup_3
webkitgtk_4_1
glib
openssl
fontconfig
libusb1
libx11
libice
libsm
libxext
libxcursor
libxi
libxrandr
];
dontStrip = true;
unpackPhase = ''
dpkg -x $src .
'';
installPhase = ''
mkdir -p $out/bin $out/lib $out/share
cp -r usr/lib/devolutions/RemoteDesktopManager $out/lib/
cp -r usr/share/* $out/share/
rm -f $out/lib/RemoteDesktopManager/libWebView-4.0.so
makeWrapper $out/lib/RemoteDesktopManager/RemoteDesktopManager $out/bin/remotedesktopmanager \
--set DOTNET_ROOT "${dotnet-runtime_8}" \
--set GDK_BACKEND x11 \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}"
'';
postInstall = ''
install -Dm755 "${./remotedesktopmanager.desktop}" "$out/share/applications/remotedesktopmanager.desktop"
install -Dm644 "${./remotedesktopmanager.svg}" "$out/share/icons/hicolor/scalable/apps/remotedesktopmanager.svg"
'';
meta = with lib; {
description = "Devolutions Remote Desktop Manager";
homepage = "https://remotedesktopmanager.com/";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
mainProgram = "remotedesktopmanager";
};
}