about summary refs log tree commit diff
path: root/pkgs/applications/networking/remote
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/remote')
-rw-r--r--pkgs/applications/networking/remote/citrix-workspace/generic.nix4
-rw-r--r--pkgs/applications/networking/remote/freerdp/3.nix209
-rw-r--r--pkgs/applications/networking/remote/nice-dcv-client/default.nix4
-rw-r--r--pkgs/applications/networking/remote/remmina/default.nix4
-rw-r--r--pkgs/applications/networking/remote/rustdesk/default.nix4
5 files changed, 217 insertions, 8 deletions
diff --git a/pkgs/applications/networking/remote/citrix-workspace/generic.nix b/pkgs/applications/networking/remote/citrix-workspace/generic.nix
index f751f3237e412..96074b3fd7da0 100644
--- a/pkgs/applications/networking/remote/citrix-workspace/generic.nix
+++ b/pkgs/applications/networking/remote/citrix-workspace/generic.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, requireFile, makeWrapper, autoPatchelfHook, wrapGAppsHook, which, more
+{ lib, stdenv, requireFile, makeWrapper, autoPatchelfHook, wrapGAppsHook3, which, more
 , file, atk, alsa-lib, cairo, fontconfig, gdk-pixbuf, glib, webkitgtk, gtk2-x11, gtk3
 , heimdal, krb5, libsoup, libvorbis, speex, openssl, zlib, xorg, pango, gtk2
 , gnome2, mesa, nss, nspr, gtk_engines, freetype, dconf, libpng12, libxml2
@@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
     makeWrapper
     more
     which
-    wrapGAppsHook
+    wrapGAppsHook3
     libfaketime
   ];
 
diff --git a/pkgs/applications/networking/remote/freerdp/3.nix b/pkgs/applications/networking/remote/freerdp/3.nix
new file mode 100644
index 0000000000000..45bb8db9d9d89
--- /dev/null
+++ b/pkgs/applications/networking/remote/freerdp/3.nix
@@ -0,0 +1,209 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, docbook-xsl-nons
+, libxslt
+, pkg-config
+, alsa-lib
+, faac
+, faad2
+, ffmpeg
+, fuse3
+, glib
+, openh264
+, openssl
+, p11-kit
+, pcre2
+, pkcs11helper
+, uriparser
+, zlib
+, libX11
+, libXcursor
+, libXdamage
+, libXdmcp
+, libXext
+, libXi
+, libXinerama
+, libXrandr
+, libXrender
+, libXtst
+, libXv
+, libxkbcommon
+, libxkbfile
+, wayland
+, wayland-scanner
+, icu
+, libunwind
+, orc
+, cairo
+, cjson
+, libusb1
+, libpulseaudio
+, cups
+, pcsclite
+, SDL2
+, SDL2_ttf
+, SDL2_image
+, systemd
+, libjpeg_turbo
+, libkrb5
+, libopus
+, buildServer ? true
+, nocaps ? false
+, AudioToolbox
+, AVFoundation
+, Carbon
+, Cocoa
+, CoreMedia
+, withUnfree ? false
+
+  # tries to compile and run generate_argument_docbook.c
+, withManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
+
+, buildPackages
+}:
+
+let
+  cmFlag = flag: if flag then "ON" else "OFF";
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "freerdp";
+  version = "3.4.0";
+
+  src = fetchFromGitHub {
+    owner = "FreeRDP";
+    repo = "FreeRDP";
+    rev = finalAttrs.version;
+    hash = "sha256-ZOYHhldTdV8DrOHoXS42NXB6JHBJMGRswgTczn1S6BE=";
+  };
+
+  postPatch = ''
+    export HOME=$TMP
+
+    # skip NIB file generation on darwin
+    substituteInPlace "client/Mac/CMakeLists.txt" "client/Mac/cli/CMakeLists.txt" \
+      --replace-fail "if (NOT IS_XCODE)" "if (FALSE)"
+
+    substituteInPlace "libfreerdp/freerdp.pc.in" \
+      --replace-fail "Requires:" "Requires: @WINPR_PKG_CONFIG_FILENAME@"
+  '' + lib.optionalString (pcsclite != null) ''
+    substituteInPlace "winpr/libwinpr/smartcard/smartcard_pcsc.c" \
+      --replace-fail "libpcsclite.so" "${lib.getLib pcsclite}/lib/libpcsclite.so"
+  '' + lib.optionalString nocaps ''
+    substituteInPlace "libfreerdp/locale/keyboard_xkbfile.c" \
+      --replace-fail "RDP_SCANCODE_CAPSLOCK" "RDP_SCANCODE_LCONTROL"
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    libxslt
+    docbook-xsl-nons
+    pkg-config
+    wayland-scanner
+  ];
+
+  buildInputs = [
+    cairo
+    cjson
+    cups
+    faad2
+    ffmpeg
+    glib
+    icu
+    libX11
+    libXcursor
+    libXdamage
+    libXdmcp
+    libXext
+    libXi
+    libXinerama
+    libXrandr
+    libXrender
+    libXtst
+    libXv
+    libjpeg_turbo
+    libkrb5
+    libopus
+    libpulseaudio
+    libunwind
+    libusb1
+    libxkbcommon
+    libxkbfile
+    openh264
+    openssl
+    orc
+    pcre2
+    pcsclite
+    pkcs11helper
+    SDL2
+    SDL2_ttf
+    SDL2_image
+    uriparser
+    zlib
+  ] ++ lib.optionals stdenv.isLinux [
+    alsa-lib
+    fuse3
+    systemd
+    wayland
+  ] ++ lib.optionals stdenv.isDarwin [
+    AudioToolbox
+    AVFoundation
+    Carbon
+    Cocoa
+    CoreMedia
+  ] ++ lib.optionals withUnfree [
+    faac
+  ];
+
+  # https://github.com/FreeRDP/FreeRDP/issues/8526#issuecomment-1357134746
+  cmakeFlags = [
+    "-Wno-dev"
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+    "-DDOCBOOKXSL_DIR=${docbook-xsl-nons}/xml/xsl/docbook"
+    "-DWAYLAND_SCANNER=${buildPackages.wayland-scanner}/bin/wayland-scanner"
+  ] ++ lib.mapAttrsToList (k: v: "-D${k}=${cmFlag v}") {
+    BUILD_TESTING = false; # false is recommended by upstream
+    WITH_CAIRO = (cairo != null);
+    WITH_CUPS = (cups != null);
+    WITH_FAAC = (withUnfree && faac != null);
+    WITH_FAAD2 = (faad2 != null);
+    WITH_FUSE = (stdenv.isLinux && fuse3 != null);
+    WITH_JPEG = (libjpeg_turbo != null);
+    WITH_KRB5 = (libkrb5 != null);
+    WITH_OPENH264 = (openh264 != null);
+    WITH_OPUS = (libopus != null);
+    WITH_OSS = false;
+    WITH_MANPAGES = withManPages;
+    WITH_PCSC = (pcsclite != null);
+    WITH_PULSE = (libpulseaudio != null);
+    WITH_SERVER = buildServer;
+    WITH_WEBVIEW = false; # avoid introducing webkit2gtk-4.0
+    WITH_VAAPI = false; # false is recommended by upstream
+    WITH_X11 = true;
+  };
+
+  env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
+    "-DTARGET_OS_IPHONE=0"
+    "-DTARGET_OS_WATCH=0"
+    "-include AudioToolbox/AudioToolbox.h"
+  ] ++ lib.optionals stdenv.cc.isClang [
+    "-Wno-error=incompatible-function-pointer-types"
+  ]);
+
+  env.NIX_LDFLAGS = toString (lib.optionals stdenv.isDarwin [
+    "-framework AudioToolbox"
+  ]);
+
+  meta = with lib; {
+    description = "A Remote Desktop Protocol Client";
+    longDescription = ''
+      FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP)
+      following the Microsoft Open Specifications.
+    '';
+    homepage = "https://www.freerdp.com/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ peterhoeg lheckemann ];
+    platforms = platforms.unix;
+  };
+})
diff --git a/pkgs/applications/networking/remote/nice-dcv-client/default.nix b/pkgs/applications/networking/remote/nice-dcv-client/default.nix
index 0722561cb6f3b..6898d0f66d47c 100644
--- a/pkgs/applications/networking/remote/nice-dcv-client/default.nix
+++ b/pkgs/applications/networking/remote/nice-dcv-client/default.nix
@@ -20,7 +20,7 @@
 , python3Packages
 , cpio
 , autoPatchelfHook
-, wrapGAppsHook
+, wrapGAppsHook3
 }:
 
 stdenv.mkDerivation rec {
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
       sha256 = "sha256-iLz25SB5v7ghkAZOMGPmpNaPihd8ikzCQS//r1xBNRU=";
     };
 
-  nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook python3Packages.rpm ];
+  nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook3 python3Packages.rpm ];
   unpackPhase = ''
     rpm2cpio $src | ${cpio}/bin/cpio -idm
   '';
diff --git a/pkgs/applications/networking/remote/remmina/default.nix b/pkgs/applications/networking/remote/remmina/default.nix
index 0fd2de49dac3e..a2455330c2225 100644
--- a/pkgs/applications/networking/remote/remmina/default.nix
+++ b/pkgs/applications/networking/remote/remmina/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitLab, cmake, ninja, pkg-config, wrapGAppsHook
+{ lib, stdenv, fetchFromGitLab, cmake, ninja, pkg-config, wrapGAppsHook3
 , desktopToDarwinBundle
 , glib, gtk3, gettext, libxkbfile, libX11, python3
 , freerdp, libssh, libgcrypt, gnutls, vte
@@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: {
     sha256 = "sha256-3HyG2PBnTq/fVsvWA81fQ2gCOoAxINWeUDwzKcOuECk=";
   };
 
-  nativeBuildInputs = [ cmake ninja pkg-config wrapGAppsHook ]
+  nativeBuildInputs = [ cmake ninja pkg-config wrapGAppsHook3 ]
     ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ];
 
   buildInputs = [
diff --git a/pkgs/applications/networking/remote/rustdesk/default.nix b/pkgs/applications/networking/remote/rustdesk/default.nix
index d220b87f2a22d..d1b0facf7f5b9 100644
--- a/pkgs/applications/networking/remote/rustdesk/default.nix
+++ b/pkgs/applications/networking/remote/rustdesk/default.nix
@@ -2,7 +2,7 @@
 , rustPlatform
 , fetchFromGitHub
 , pkg-config
-, wrapGAppsHook
+, wrapGAppsHook3
 , atk
 , bzip2
 , cairo
@@ -87,7 +87,7 @@ rustPlatform.buildRustPackage rec {
     copyDesktopItems
     pkg-config
     rustPlatform.bindgenHook
-    wrapGAppsHook
+    wrapGAppsHook3
   ];
 
   buildFeatures = lib.optionals stdenv.isLinux [ "linux-pkg-config" ];