diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/remote')
18 files changed, 1477 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/remote/anydesk/default.nix b/nixpkgs/pkgs/applications/networking/remote/anydesk/default.nix new file mode 100644 index 000000000000..890553b338eb --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/anydesk/default.nix @@ -0,0 +1,92 @@ +{ 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 +, pulseaudio }: + +let + description = "Desktop sharing application, providing remote support and online meetings"; + + desktopItem = makeDesktopItem { + name = "AnyDesk"; + exec = "@out@/bin/anydesk"; + icon = "anydesk"; + desktopName = "AnyDesk"; + genericName = description; + categories = "Network;"; + startupNotify = "false"; + }; + +in stdenv.mkDerivation rec { + pname = "anydesk"; + version = "6.1.1"; + + src = fetchurl { + urls = [ + "https://download.anydesk.com/linux/${pname}-${version}-amd64.tar.gz" + "https://download.anydesk.com/linux/generic-linux/${pname}-${version}-amd64.tar.gz" + ]; + sha256 = "1ai58fsivb8al1279bayl800qavy0kfj40rjhf87g902ap3p4bhh"; + }; + + passthru = { + updateScript = genericUpdater { + inherit pname version; + versionLister = writeShellScript "anydesk-versionLister" '' + echo "# Versions for $1:" >> "$2" + 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' + ''; + }; + }; + + buildInputs = [ + atk cairo gdk-pixbuf glib gtk2 stdenv.cc.cc pango + gnome2.gtkglext libGLU libGL minizip freetype + fontconfig polkit polkit_gnome pulseaudio + ] ++ (with xorg; [ + libxcb libxkbfile libX11 libXdamage libXext libXfixes libXi libXmu + libXrandr libXtst libXt libICE libSM libXrender + ]); + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin $out/share/{applications,doc/anydesk,icons/hicolor} + install -m755 anydesk $out/bin/anydesk + cp copyright README $out/share/doc/anydesk + cp -r icons/hicolor/* $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 "${lib.makeLibraryPath buildInputs}" \ + $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 + + wrapProgram $out/bin/anydesk \ + --prefix PATH : ${lib.makeBinPath [ lsb-release pciutils ]} + + substituteInPlace $out/share/applications/*.desktop \ + --subst-var out + ''; + + meta = with lib; { + inherit description; + homepage = "https://www.anydesk.com"; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ shyim ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/aws-workspaces/default.nix b/nixpkgs/pkgs/applications/networking/remote/aws-workspaces/default.nix new file mode 100644 index 000000000000..48b44656ff0a --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/aws-workspaces/default.nix @@ -0,0 +1,72 @@ +{ stdenv, lib +, makeWrapper, dpkg, fetchurl, autoPatchelfHook +, curl, libkrb5, lttng-ust, libpulseaudio, gtk3, openssl_1_1, icu, webkitgtk, librsvg, gdk-pixbuf, libsoup, glib-networking +}: + +stdenv.mkDerivation rec { + pname = "aws-workspaces"; + version = "4.0.1.1302"; + + src = fetchurl { + # ref https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu/dists/bionic/main/binary-amd64/Packages + urls = [ + "https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu/dists/bionic/main/binary-amd64/workspacesclient_${version}_amd64.deb" + "https://web.archive.org/web/20210921220718/https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu/dists/bionic/main/binary-amd64/workspacesclient_${version}_amd64.deb" + ]; + sha256 = "208e67a544be5be7ff25218d68b4eb2ea9e65abfed444c99a0f7a6738d69ab9a"; + }; + + nativeBuildInputs = [ + autoPatchelfHook + makeWrapper + ]; + + # Crashes at startup when stripping: + # "Failed to create CoreCLR, HRESULT: 0x80004005" + dontStrip = true; + + buildInputs = [ + stdenv.cc.cc.lib + libkrb5 + curl + lttng-ust + libpulseaudio + gtk3 + openssl_1_1.out + icu + webkitgtk + librsvg + gdk-pixbuf + libsoup + glib-networking + ]; + + unpackPhase = '' + ${dpkg}/bin/dpkg -x $src $out + ''; + + preFixup = '' + patchelf --replace-needed liblttng-ust.so.0 liblttng-ust.so $out/lib/libcoreclrtraceptprovider.so + ''; + + installPhase = '' + mkdir -p $out/bin $out/lib + mv $out/opt/workspacesclient/* $out/lib + rm -rf $out/opt + + wrapProgram $out/lib/workspacesclient \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}" \ + --set GDK_PIXBUF_MODULE_FILE "${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \ + --set GIO_EXTRA_MODULES "${glib-networking.out}/lib/gio/modules" + + mv $out/lib/workspacesclient $out/bin + ''; + + meta = with lib; { + description = "Client for Amazon WorkSpaces, a managed, secure Desktop-as-a-Service (DaaS) solution"; + homepage = "https://clients.amazonworkspaces.com"; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; # TODO Mac support + maintainers = [ maintainers.mausch ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/citrix-workspace/default.nix b/nixpkgs/pkgs/applications/networking/remote/citrix-workspace/default.nix new file mode 100644 index 000000000000..c73789ddeb7b --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/citrix-workspace/default.nix @@ -0,0 +1,25 @@ +{ lib, callPackage }: + +# For detailed information about the Citrix source-tarball, please refer to the OEM +# reference guide: https://developer-docs.citrix.com/projects/workspace-app-for-linux-oem-guide/en/latest/ + +let + inherit (callPackage ./sources.nix { }) supportedVersions unsupportedVersions; + mkCitrix = callPackage ./generic.nix { }; + + toAttrName = x: "citrix_workspace_${builtins.replaceStrings [ "." ] [ "_" ] x}"; + + unsupported = lib.listToAttrs ( + map (x: lib.nameValuePair (toAttrName x) (throw '' + Citrix Workspace at version ${x} is not supported anymore! + + Actively supported releases are listed here: + https://www.citrix.com/support/product-lifecycle/milestones/receiver.html + '')) unsupportedVersions + ); + + supported = lib.mapAttrs' ( + attr: versionInfo: lib.nameValuePair (toAttrName attr) (callPackage ./generic.nix versionInfo) + ) supportedVersions; +in + supported // unsupported diff --git a/nixpkgs/pkgs/applications/networking/remote/citrix-workspace/generic.nix b/nixpkgs/pkgs/applications/networking/remote/citrix-workspace/generic.nix new file mode 100644 index 000000000000..2f9c5f76c5e8 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/citrix-workspace/generic.nix @@ -0,0 +1,210 @@ +{ lib, stdenv, requireFile, makeWrapper, autoPatchelfHook, wrapGAppsHook, 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 +, libjpeg, libredirect, tzdata, cacert, systemd, libcxxabi, libcxx, e2fsprogs, symlinkJoin +, libpulseaudio, pcsclite, glib-networking + +, homepage, version, prefix, hash + +, extraCerts ? [] +}: + +let + openssl' = symlinkJoin { + name = "openssl-backwards-compat"; + nativeBuildInputs = [ makeWrapper ]; + paths = [ openssl.out ]; + postBuild = '' + ln -sf $out/lib/libcrypto.so $out/lib/libcrypto.so.1.0.0 + ln -sf $out/lib/libssl.so $out/lib/libssl.so.1.0.0 + ''; + }; +in + +stdenv.mkDerivation rec { + pname = "citrix-workspace"; + inherit version; + + src = requireFile rec { + name = "${prefix}-${version}.tar.gz"; + sha256 = hash; + + message = '' + In order to use Citrix Workspace, you need to comply with the Citrix EULA and download + the ${if stdenv.is64bit then "64-bit" else "32-bit"} binaries, .tar.gz from: + + ${homepage} + + (if you do not find version ${version} there, try at + https://www.citrix.com/downloads/workspace-app/ + + Once you have downloaded the file, please use the following command and re-run the + installation: + + nix-prefetch-url file://\$PWD/${name} + ''; + }; + + dontBuild = true; + dontConfigure = true; + sourceRoot = "."; + preferLocalBuild = true; + passthru.icaroot = "${placeholder "out"}/opt/citrix-icaclient"; + + nativeBuildInputs = [ + autoPatchelfHook + file + makeWrapper + more + which + wrapGAppsHook + ]; + + buildInputs = [ + alsa-lib + atk + cairo + dconf + fontconfig + freetype + gdk-pixbuf + gnome2.gtkglext + webkitgtk + gtk2 + gtk2-x11 + gtk3 + gtk_engines + heimdal + krb5 + libcxx + libcxxabi + libjpeg + libpng12 + libsoup + libvorbis + libxml2 + mesa + nspr + nss + openssl' + pango + speex + (lib.getLib systemd) + stdenv.cc.cc + xorg.libXaw + xorg.libXmu + xorg.libXScrnSaver + xorg.libXtst + zlib + ] ++ lib.optional (lib.versionOlder version "20.04") e2fsprogs + ++ lib.optional (lib.versionAtLeast version "20.10") libpulseaudio; + + runtimeDependencies = [ + glib + glib-networking + pcsclite + + xorg.libX11 + xorg.libXScrnSaver + xorg.libXext + xorg.libXfixes + xorg.libXinerama + xorg.libXmu + xorg.libXrender + xorg.libXtst + xorg.libxcb + ]; + + installPhase = let + icaFlag = program: + if (builtins.match "selfservice(.*)" program) != null then "--icaroot" + else "-icaroot"; + wrap = program: '' + wrapProgram $out/opt/citrix-icaclient/${program} \ + --add-flags "${icaFlag program} $ICAInstDir" \ + --set ICAROOT "$ICAInstDir" \ + --prefix LD_LIBRARY_PATH : "$ICAInstDir:$ICAInstDir/lib" \ + --set LD_PRELOAD "${libredirect}/lib/libredirect.so" \ + --set NIX_REDIRECTS "/usr/share/zoneinfo=${tzdata}/share/zoneinfo:/etc/zoneinfo=${tzdata}/share/zoneinfo:/etc/timezone=$ICAInstDir/timezone" + ''; + wrapLink = program: '' + ${wrap program} + ln -sf $out/opt/citrix-icaclient/${program} $out/bin/${baseNameOf program} + ''; + + copyCert = path: '' + cp -v ${path} $out/opt/citrix-icaclient/keystore/cacerts/${baseNameOf path} + ''; + + mkWrappers = lib.concatMapStringsSep "\n"; + + toWrap = [ "wfica" "selfservice" "util/configmgr" "util/conncenter" "util/ctx_rehash" ] + ++ lib.optional (lib.versionOlder version "20.06") "selfservice_old"; + in '' + runHook preInstall + + mkdir -p $out/{bin,share/applications} + export ICAInstDir="$out/opt/citrix-icaclient" + export HOME=$(mktemp -d) + + # Run upstream installer in the store-path. + sed -i -e 's,^ANSWER="",ANSWER="$INSTALLER_YES",g' -e 's,/bin/true,true,g' ./${prefix}/hinst + ${stdenv.shell} ${prefix}/hinst CDROM "$(pwd)" + + if [ -f "$ICAInstDir/util/setlog" ]; then + chmod +x "$ICAInstDir/util/setlog" + ln -sf "$ICAInstDir/util/setlog" "$out/bin/citrix-setlog" + fi + ${mkWrappers wrapLink toWrap} + ${mkWrappers wrap [ "PrimaryAuthManager" "ServiceRecord" "AuthManagerDaemon" "util/ctxwebhelper" ]} + + ln -sf $ICAInstDir/util/storebrowse $out/bin/storebrowse + + # As explained in https://wiki.archlinux.org/index.php/Citrix#Security_Certificates + echo "Expanding certificates..." + pushd "$ICAInstDir/keystore/cacerts" + awk 'BEGIN {c=0;} /BEGIN CERT/{c++} { print > "cert." c ".pem"}' \ + < ${cacert}/etc/ssl/certs/ca-bundle.crt + popd + + ${mkWrappers copyCert extraCerts} + + # See https://developer-docs.citrix.com/projects/workspace-app-for-linux-oem-guide/en/latest/reference-information/#library-files + # Those files are fallbacks to support older libwekit.so and libjpeg.so + rm $out/opt/citrix-icaclient/lib/ctxjpeg_fb_8.so || true + rm $out/opt/citrix-icaclient/lib/UIDialogLibWebKit.so || true + + # We support only Gstreamer 1.0 + rm $ICAInstDir/util/{gst_aud_{play,read},gst_*0.10,libgstflatstm0.10.so} + ln -sf $ICAInstDir/util/gst_play1.0 $ICAInstDir/util/gst_play + ln -sf $ICAInstDir/util/gst_read1.0 $ICAInstDir/util/gst_read + + echo "We arbitrarily set the timezone to UTC. No known consequences at this point." + echo UTC > "$ICAInstDir/timezone" + + echo "Copy .desktop files." + cp $out/opt/citrix-icaclient/desktop/* $out/share/applications/ + + # We introduce a dependency on the source file so that it need not be redownloaded everytime + echo $src >> "$out/share/workspace_dependencies.pin" + + runHook postInstall + ''; + + # Make sure that `autoPatchelfHook` is executed before + # running `ctx_rehash`. + dontAutoPatchelf = true; + postFixup = '' + autoPatchelf -- "$out" + $out/opt/citrix-icaclient/util/ctx_rehash + ''; + + meta = with lib; { + license = licenses.unfree; + description = "Citrix Workspace"; + platforms = platforms.linux; + maintainers = with maintainers; [ pmenke ]; + inherit homepage; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/citrix-workspace/sources.nix b/nixpkgs/pkgs/applications/networking/remote/citrix-workspace/sources.nix new file mode 100644 index 000000000000..7311acf82783 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/citrix-workspace/sources.nix @@ -0,0 +1,135 @@ +{ stdenv, lib }: + +let + mkVersionInfo = _: { major, minor, patch, x64hash, x86hash, x64suffix, x86suffix, homepage }: + { inherit homepage; + version = "${major}.${minor}.${patch}.${if stdenv.is64bit then x64suffix else x86suffix}"; + prefix = "linuxx${if stdenv.is64bit then "64" else "86"}"; + hash = if stdenv.is64bit then x64hash else x86hash; + }; + + # Attribute-set with all actively supported versions of the Citrix workspace app + # for Linux. + # + # The latest versions can be found at https://www.citrix.com/downloads/workspace-app/linux/ + supportedVersions = lib.mapAttrs mkVersionInfo { + "20.04.0" = { + major = "20"; + minor = "04"; + patch = "0"; + x64hash = "E923592216F9541173846F932784E6C062CB09C9E8858219C7489607BF82A0FB"; + x86hash = "A2E2E1882723DA6796E68916B3BB2B44DD575A83DEB03CA90A262F6C81B1A53F"; + x64suffix = "21"; + x86suffix = "21"; + homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2004.html"; + }; + + "20.06.0" = { + major = "20"; + minor = "06"; + patch = "0"; + x64hash = "1kpfcfg95mpprlca6cccnjlsqbj3xvv77cn3fc5msd304nsi9x1v"; + x86hash = "1di29hrimbw3myjnf2nn26a14klidhdwvjqla6yxhwd3s6lil194"; + x64suffix = "15"; + x86suffix = "15"; + homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2006.html"; + }; + + "20.09.0" = { + major = "20"; + minor = "9"; + patch = "0"; + x64hash = "15gjq1vk1y76c39p72xnam9h9rnr0632i4n11l6xbjnfnad8d4pr"; + x86hash = "1b4gdmnnpa61ydiv2fnmap8cnfhskrq6swcs6i1nqrp5zvvkqrv4"; + x64suffix = "15"; + x86suffix = "15"; + homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2009.html"; + }; + + "20.10.0" = { + major = "20"; + minor = "10"; + patch = "0"; + x64hash = "13g7r92mhwqwqkm6a4k4yn232ighkmxifs7j8wdi1yva0dvklqdf"; + x86hash = "04cr2da25v8x098ccyjwa47d4krk3jpldqkyf4kk2j3hwzbqh9yx"; + x64suffix = "6"; + x86suffix = "6"; + homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2010.html"; + }; + + "20.12.0" = { + major = "20"; + minor = "12"; + patch = "0"; + x64hash = "1268nriqjp27nxqqi4dvkv8r01yj3bhglxv21xd185761da2mzry"; + x86hash = "0f982d5y9k4hscqfmqpfs277cqw1pvp191ybvg5p8rxk12fh67vf"; + x64suffix = "12"; + x86suffix = "12"; + homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2012.html"; + }; + + "21.01.0" = { + major = "21"; + minor = "1"; + patch = "0"; + x64hash = "01m9g1bs6iiqbd778gjps2zznvqijlyn3mfw38aa0w1rr6ms326a"; + x86hash = "1mmx5r3wi9i6bwh4kdlpw446m8kijkaar8shi0q1n21fv0ygg3r5"; + x64suffix = "14"; + x86suffix = "14"; + homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2101.html"; + }; + + "21.03.0" = { + major = "21"; + minor = "3"; + patch = "0"; + x64hash = "004pgvxl81l99sqvrs5xzvjivjlc21rrlm2gky9hmbsm53nsl3zc"; + x86hash = "11nn9734a515dm1q880z9wmhvx8ikyh3riayyn42z22q4kd852n3"; + x64suffix = "38"; + x86suffix = "38"; + homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2103.html"; + }; + + "21.06.0" = { + major = "21"; + minor = "6"; + patch = "0"; + x64hash = "f3f98c60b0aaac31eb44dc98f22ee7ae7df229c960d5d29785eb5e9554f85f68"; + x86hash = "c2d9652ad9488a9ff171e62df8455ebe6890bcfade1cc289893ee35322d9d812"; + x64suffix = "28"; + x86suffix = "28"; + homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2106.html"; + }; + + "21.08.0" = { + major = "21"; + minor = "8"; + patch = "0"; + x64hash = "69ddae29cc8b4b68341c3d9503a54ee70ab58a5795fd83e79573f013eda5518c"; + x86hash = "b6d1bde5a8533f22374e1f5bbb3f5949e5b89773d0703e021fbe784b455aad3f"; + x64suffix = "40"; + x86suffix = "40"; + homepage = "https://www.citrix.com/downloads/workspace-app/legacy-workspace-app-for-linux/workspace-app-for-linux-2108.html"; + }; + + "21.09.0" = { + major = "21"; + minor = "9"; + patch = "0"; + x64hash = "d58d5cbbcb5ace95b75b1400061d475b8e72dbdf5f03abacea6d39686991f848"; + x86hash = "c646c52889e88aa0bb051070076763d5407f21fb6ad6dfcb0fe635ac01180c51"; + x64suffix = "25"; + x86suffix = "25"; + homepage = "https://www.citrix.com/downloads/workspace-app/linux/workspace-app-for-linux-latest.html"; + }; + }; + + # Retain attribute-names for abandoned versions of Citrix workspace to + # provide a meaningful error-message if it's attempted to use such an old one. + # + # The lifespans of Citrix products can be found here: + # https://www.citrix.com/support/product-lifecycle/milestones/receiver.html + unsupportedVersions = [ ]; +in { + inherit supportedVersions unsupportedVersions; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/freerdp/default.nix b/nixpkgs/pkgs/applications/networking/remote/freerdp/default.nix new file mode 100644 index 000000000000..0f76bced878a --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/freerdp/default.nix @@ -0,0 +1,115 @@ +{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, alsa-lib, ffmpeg, glib, openssl +, pcre, zlib, libX11, libXcursor, libXdamage, libXext, libXi, libXinerama +, libXrandr, libXrender, libXv, libXtst, libxkbcommon, libxkbfile, wayland +, gstreamer, gst-plugins-base, gst-plugins-good, libunwind, orc, libxslt, cairo +, libusb1, libpulseaudio, cups, pcsclite, systemd, libjpeg_turbo +, buildServer ? true, nocaps ? false +}: + +let + cmFlag = flag: if flag then "ON" else "OFF"; + disabledTests = [ + # this one is probably due to our sandbox + { + dir = "libfreerdp/crypto/test"; + file = "Test_x509_cert_info.c"; + } + ]; + +in stdenv.mkDerivation rec { + pname = "freerdp"; + version = "2.4.0"; + + src = fetchFromGitHub { + owner = "FreeRDP"; + repo = "FreeRDP"; + rev = version; + sha256 = "sha256-o+9twuyH9keWJriCSNkR63+xZuuOmPjoWg+Jp616CsQ="; + }; + + postPatch = '' + export HOME=$TMP + + # failing test(s) + ${lib.concatMapStringsSep "\n" (e: '' + substituteInPlace ${e.dir}/CMakeLists.txt \ + --replace ${e.file} "" + rm ${e.dir}/${e.file} + '') disabledTests} + + substituteInPlace "libfreerdp/freerdp.pc.in" \ + --replace "Requires:" "Requires: @WINPR_PKG_CONFIG_FILENAME@" + '' + lib.optionalString (pcsclite != null) '' + substituteInPlace "winpr/libwinpr/smartcard/smartcard_pcsc.c" \ + --replace "libpcsclite.so" "${lib.getLib pcsclite}/lib/libpcsclite.so" + '' + lib.optionalString nocaps '' + substituteInPlace "libfreerdp/locale/keyboard_xkbfile.c" \ + --replace "RDP_SCANCODE_CAPSLOCK" "RDP_SCANCODE_LCONTROL" + ''; + + buildInputs = with lib; + [ + alsa-lib + cairo + cups + ffmpeg + glib + gst-plugins-base + gst-plugins-good + gstreamer + libX11 + libXcursor + libXdamage + libXext + libXi + libXinerama + libXrandr + libXrender + libXtst + libXv + libjpeg_turbo + libpulseaudio + libunwind + libusb1 + libxkbcommon + libxkbfile + libxslt + openssl + orc + pcre + pcsclite + wayland + zlib + ] ++ optional stdenv.isLinux systemd; + + nativeBuildInputs = [ cmake pkg-config ]; + + doCheck = true; + + cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ] + ++ lib.mapAttrsToList (k: v: "-D${k}=${if v then "ON" else "OFF"}") { + BUILD_TESTING = doCheck; + WITH_CUNIT = doCheck; + WITH_CUPS = (cups != null); + WITH_OSS = false; + WITH_PCSC = (pcsclite != null); + WITH_PULSE = (libpulseaudio != null); + WITH_SERVER = buildServer; + WITH_SSE2 = stdenv.isx86_64; + WITH_VAAPI = true; + WITH_JPEG = (libjpeg_turbo != null); + WITH_CAIRO = (cairo != null); + }; + + 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/nixpkgs/pkgs/applications/networking/remote/nice-dcv-client/default.nix b/nixpkgs/pkgs/applications/networking/remote/nice-dcv-client/default.nix new file mode 100644 index 000000000000..3344174cb2a0 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/nice-dcv-client/default.nix @@ -0,0 +1,87 @@ +{ lib, stdenv +, fetchurl +, glib +, libX11 +, gst_all_1 +, sqlite +, epoxy +, pango +, cairo +, gdk-pixbuf +, e2fsprogs +, libkrb5 +, libva +, openssl +, pcsclite +, gtk3 +, libselinux +, libxml2 +, python3Packages +, cpio +, autoPatchelfHook +}: + +stdenv.mkDerivation rec { + pname = "nice-dcv-client"; + version = "2020.2.1737-1"; + + src = + fetchurl { + url = "https://d1uj6qtbmh3dt5.cloudfront.net/2020.2/Clients/nice-dcv-viewer-${version}.el8.x86_64.rpm"; + sha256 = "sha256-SUpfHd/Btc07cfjc3zx5I5BiNatr/c4E2/mfJuU4R1E="; + }; + + nativeBuildInputs = [ autoPatchelfHook python3Packages.rpm ]; + unpackPhase = '' + rpm2cpio $src | ${cpio}/bin/cpio -idm + ''; + + buildInputs = [ + libselinux + libkrb5 + libxml2 + libva + e2fsprogs + libX11 + openssl + pcsclite + gtk3 + cairo + epoxy + pango + gdk-pixbuf + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + ]; + + installPhase = '' + mkdir -p $out/bin/ + mkdir -p $out/lib64/ + + mv usr/bin/dcvviewer $out/bin/dcvviewer + mv usr/lib64/* $out/lib64/ + + mkdir -p $out/libexec/dcvviewer + mv usr/libexec/dcvviewer/dcvviewer $out/libexec/dcvviewer/dcvviewer + patchelf \ + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ + $out/libexec/dcvviewer/dcvviewer + + # Fix the wrapper script to have the right basedir. + sed -i "s#basedir=/usr#basedir=$out#" $out/bin/dcvviewer + + mv usr/share $out/ + ${glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas + + # broken symlink, seems to give a warning message if i don't delete it + rm $out/lib64/dcvviewer/gio/modules/libdconfsettings.so + ''; + + meta = with lib; { + description = "High-performance remote display protocol"; + homepage = "https://aws.amazon.com/hpc/dcv/"; + license = licenses.unfree; + platforms = platforms.linux; + maintainers = with maintainers; [ rmcgibbo ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/putty/default.nix b/nixpkgs/pkgs/applications/networking/remote/putty/default.nix new file mode 100644 index 000000000000..6249cce973ef --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/putty/default.nix @@ -0,0 +1,55 @@ +{ stdenv, lib, fetchurl, autoconf, automake, pkg-config, libtool +, gtk2, halibut, ncurses, perl, darwin +}: + +stdenv.mkDerivation rec { + version = "0.76"; + pname = "putty"; + + src = fetchurl { + urls = [ + "https://the.earth.li/~sgtatham/putty/${version}/${pname}-${version}.tar.gz" + "ftp://ftp.wayne.edu/putty/putty-website-mirror/${version}/${pname}-${version}.tar.gz" + ]; + sha256 = "0gvi8phabszqksj2by5jrjmshm7bpirhgavz0dqyz1xaimxdjz2l"; + }; + + # glib-2.62 deprecations + NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; + + preConfigure = lib.optionalString stdenv.hostPlatform.isUnix '' + perl mkfiles.pl + ( cd doc ; make ); + ./mkauto.sh + cd unix + '' + lib.optionalString stdenv.hostPlatform.isWindows '' + cd windows + ''; + + TOOLPATH = stdenv.cc.targetPrefix; + makefile = if stdenv.hostPlatform.isWindows then "Makefile.mgw" else null; + + installPhase = if stdenv.hostPlatform.isWindows then '' + for exe in *.exe; do + install -D $exe $out/bin/$exe + done + '' else null; + + nativeBuildInputs = [ autoconf automake halibut libtool perl pkg-config ]; + buildInputs = lib.optionals stdenv.hostPlatform.isUnix [ + gtk2 ncurses + ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.libs.utmp; + enableParallelBuilding = true; + + meta = with lib; { + description = "A Free Telnet/SSH Client"; + longDescription = '' + PuTTY is a free implementation of Telnet and SSH for Windows and Unix + platforms, along with an xterm terminal emulator. + It is written and maintained primarily by Simon Tatham. + ''; + homepage = "https://www.chiark.greenend.org.uk/~sgtatham/putty/"; + license = licenses.mit; + platforms = platforms.unix ++ platforms.windows; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/rdesktop/default.nix b/nixpkgs/pkgs/applications/networking/remote/rdesktop/default.nix new file mode 100644 index 000000000000..e2ee9428ad24 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/rdesktop/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchFromGitHub, openssl, libX11, krb5, libXcursor, libtasn1 +, nettle, gnutls, pkg-config, autoreconfHook, libiconv +, enableCredssp ? (!stdenv.isDarwin) +} : + +stdenv.mkDerivation (rec { + pname = "rdesktop"; + version = "1.9.0"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + sha256 = "1s6k1jwd28y38ymk3lfv76ch4arpfwrbdhpkbnwwy3fc4617gb78"; + }; + + nativeBuildInputs = [pkg-config autoreconfHook]; + buildInputs = [openssl libX11 libXcursor libtasn1 nettle gnutls] + ++ lib.optional enableCredssp krb5 + ++ lib.optional stdenv.isDarwin libiconv; + + configureFlags = [ + "--with-ipv6" + "--with-openssl=${openssl.dev}" + "--disable-smartcard" + ] ++ lib.optional (!enableCredssp) "--disable-credssp"; + + meta = { + description = "Open source client for Windows Terminal Services"; + homepage = "http://www.rdesktop.org/"; + platforms = lib.platforms.linux ++ lib.platforms.darwin; + license = lib.licenses.gpl2; + }; +}) diff --git a/nixpkgs/pkgs/applications/networking/remote/remmina/default.nix b/nixpkgs/pkgs/applications/networking/remote/remmina/default.nix new file mode 100644 index 000000000000..f61a00f89ada --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/remmina/default.nix @@ -0,0 +1,60 @@ +{ lib, stdenv, fetchFromGitLab, cmake, ninja, pkg-config, wrapGAppsHook +, glib, gtk3, gettext, libxkbfile, libX11 +, freerdp, libssh, libgcrypt, gnutls +, pcre2, libdbusmenu-gtk3, libappindicator-gtk3 +, libvncserver, libpthreadstubs, libXdmcp, libxkbcommon +, libsecret, libsoup, spice-protocol, spice-gtk, epoxy, at-spi2-core +, openssl, gsettings-desktop-schemas, json-glib, libsodium, webkitgtk, harfbuzz +# The themes here are soft dependencies; only icons are missing without them. +, gnome +}: + +with lib; + +stdenv.mkDerivation rec { + pname = "remmina"; + version = "1.4.20"; + + src = fetchFromGitLab { + owner = "Remmina"; + repo = "Remmina"; + rev = "v${version}"; + sha256 = "sha256-m3DUaoOD8COxMwCVBTipzCAz3mqIdunEbVPjyjAl9So="; + }; + + nativeBuildInputs = [ cmake ninja pkg-config wrapGAppsHook ]; + buildInputs = [ + gsettings-desktop-schemas + glib gtk3 gettext libxkbfile libX11 + freerdp libssh libgcrypt gnutls + pcre2 libdbusmenu-gtk3 libappindicator-gtk3 + libvncserver libpthreadstubs libXdmcp libxkbcommon + libsecret libsoup spice-protocol spice-gtk epoxy at-spi2-core + openssl gnome.adwaita-icon-theme json-glib libsodium webkitgtk + harfbuzz + ]; + + cmakeFlags = [ + "-DWITH_VTE=OFF" + "-DWITH_TELEPATHY=OFF" + "-DWITH_AVAHI=OFF" + "-DFREERDP_LIBRARY=${freerdp}/lib/libfreerdp2.so" + "-DFREERDP_CLIENT_LIBRARY=${freerdp}/lib/libfreerdp-client2.so" + "-DFREERDP_WINPR_LIBRARY=${freerdp}/lib/libwinpr2.so" + "-DWINPR_INCLUDE_DIR=${freerdp}/include/winpr2" + ]; + + preFixup = '' + gappsWrapperArgs+=( + --prefix LD_LIBRARY_PATH : "${libX11.out}/lib" + ) + ''; + + meta = { + license = licenses.gpl2Plus; + homepage = "https://gitlab.com/Remmina/Remmina"; + description = "Remote desktop client written in GTK"; + maintainers = with maintainers; [ melsigl ryantm ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/teamviewer/default.nix b/nixpkgs/pkgs/applications/networking/remote/teamviewer/default.nix new file mode 100644 index 000000000000..158f2aa327e0 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/teamviewer/default.nix @@ -0,0 +1,102 @@ +{ mkDerivation, lib, fetchurl, autoPatchelfHook, makeWrapper, xdg-utils, dbus +, qtbase, qtwebkit, qtwebengine, qtx11extras, qtquickcontrols, getconf, glibc +, libXrandr, libX11, libXext, libXdamage, libXtst, libSM, libXfixes, coreutils +, wrapQtAppsHook +}: + +mkDerivation rec { + pname = "teamviewer"; + version = "15.22.3"; + + src = fetchurl { + url = "https://dl.tvcdn.de/download/linux/version_15x/teamviewer_${version}_amd64.deb"; + sha256 = "15fvzhdq7mnx2l2w4byvij8ww16qwdlkbadal60rm66yzv79mv9w"; + }; + + unpackPhase = '' + ar x $src + tar xf data.tar.* + ''; + + nativeBuildInputs = [ autoPatchelfHook makeWrapper wrapQtAppsHook ]; + buildInputs = [ dbus getconf qtbase qtwebkit qtwebengine qtx11extras libX11 ]; + propagatedBuildInputs = [ qtquickcontrols ]; + + installPhase = '' + mkdir -p $out/share/teamviewer $out/bin $out/share/applications + cp -a opt/teamviewer/* $out/share/teamviewer + rm -R \ + $out/share/teamviewer/logfiles \ + $out/share/teamviewer/config \ + $out/share/teamviewer/tv_bin/RTlib \ + $out/share/teamviewer/tv_bin/xdg-utils \ + $out/share/teamviewer/tv_bin/script/{teamviewer_setup,teamviewerd.sysv,teamviewerd.service,teamviewerd.*.conf,libdepend,tv-delayed-start.sh} + + ln -s $out/share/teamviewer/tv_bin/script/teamviewer $out/bin + ln -s $out/share/teamviewer/tv_bin/teamviewerd $out/bin + ln -s $out/share/teamviewer/tv_bin/desktop/com.teamviewer.*.desktop $out/share/applications + ln -s /var/lib/teamviewer $out/share/teamviewer/config + ln -s /var/log/teamviewer $out/share/teamviewer/logfiles + ln -s ${xdg-utils}/bin $out/share/teamviewer/tv_bin/xdg-utils + + declare in_script_dir="./opt/teamviewer/tv_bin/script" + + install -d "$out/share/dbus-1/services" + install -m 644 "$in_script_dir/com.teamviewer.TeamViewer.service" "$out/share/dbus-1/services" + substituteInPlace "$out/share/dbus-1/services/com.teamviewer.TeamViewer.service" \ + --replace '/opt/teamviewer/tv_bin/TeamViewer' \ + "$out/share/teamviewer/tv_bin/TeamViewer" + install -m 644 "$in_script_dir/com.teamviewer.TeamViewer.Desktop.service" "$out/share/dbus-1/services" + substituteInPlace "$out/share/dbus-1/services/com.teamviewer.TeamViewer.Desktop.service" \ + --replace '/opt/teamviewer/tv_bin/TeamViewer_Desktop' \ + "$out/share/teamviewer/tv_bin/TeamViewer_Desktop" + + install -d "$out/share/dbus-1/system.d" + install -m 644 "$in_script_dir/com.teamviewer.TeamViewer.Daemon.conf" "$out/share/dbus-1/system.d" + + install -d "$out/share/polkit-1/actions" + install -m 644 "$in_script_dir/com.teamviewer.TeamViewer.policy" "$out/share/polkit-1/actions" + substituteInPlace "$out/share/polkit-1/actions/com.teamviewer.TeamViewer.policy" \ + --replace '/opt/teamviewer/tv_bin/script/execscript' \ + "$out/share/teamviewer/tv_bin/script/execscript" + + for i in 16 20 24 32 48 256; do + size=$i"x"$i + + mkdir -p $out/share/icons/hicolor/$size/apps + ln -s $out/share/teamviewer/tv_bin/desktop/teamviewer_$i.png $out/share/icons/hicolor/$size/apps/TeamViewer.png + done; + + sed -i "s,/opt/teamviewer,$out/share/teamviewer,g" $out/share/teamviewer/tv_bin/desktop/com.teamviewer.*.desktop + + substituteInPlace $out/share/teamviewer/tv_bin/script/tvw_aux \ + --replace '/lib64/ld-linux-x86-64.so.2' '${glibc.out}/lib/ld-linux-x86-64.so.2' + substituteInPlace $out/share/teamviewer/tv_bin/script/tvw_config \ + --replace '/var/run/' '/run/' + ''; + + makeWrapperArgs = [ + "--prefix PATH : ${lib.makeBinPath [ getconf coreutils ]}" + "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libXrandr libX11 libXext libXdamage libXtst libSM libXfixes dbus ]}" + ]; + + postFixup = '' + wrapProgram $out/share/teamviewer/tv_bin/teamviewerd ''${makeWrapperArgs[@]} + # tv_bin/script/teamviewer runs tvw_main which runs tv_bin/TeamViewer + wrapProgram $out/share/teamviewer/tv_bin/script/teamviewer ''${makeWrapperArgs[@]} ''${qtWrapperArgs[@]} + wrapProgram $out/share/teamviewer/tv_bin/teamviewer-config ''${makeWrapperArgs[@]} ''${qtWrapperArgs[@]} + wrapProgram $out/share/teamviewer/tv_bin/TeamViewer_Desktop ''${makeWrapperArgs[@]} ''${qtWrapperArgs[@]} + ''; + + dontStrip = true; + dontWrapQtApps = true; + preferLocalBuild = true; + + meta = with lib; { + homepage = "http://www.teamviewer.com"; + license = licenses.unfree; + description = "Desktop sharing application, providing remote support and online meetings"; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ jagajaga dasuxullebt jraygauthier ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/vmware-horizon-client/default.nix b/nixpkgs/pkgs/applications/networking/remote/vmware-horizon-client/default.nix new file mode 100644 index 000000000000..033386afd1ff --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/vmware-horizon-client/default.nix @@ -0,0 +1,155 @@ +{ stdenv +, lib +, at-spi2-atk +, atk +, buildFHSUserEnv +, cairo +, dbus +, fetchurl +, fontconfig +, freetype +, gdk-pixbuf +, glib +, gsettings-desktop-schemas +, gtk2 +, gtk3-x11 +, harfbuzz +, liberation_ttf +, libjpeg +, libtiff +, libudev0-shim +, libuuid +, libX11 +, libXcursor +, libXext +, libXi +, libXinerama +, libxkbfile +, libxml2 +, libXrandr +, libXrender +, libXScrnSaver +, libxslt +, libXtst +, makeDesktopItem +, makeWrapper +, pango +, pcsclite +, pixman +, zlib +}: +let + version = "2106.1"; + + sysArch = + if stdenv.hostPlatform.system == "x86_64-linux" then "x64" + else throw "Unsupported system: ${stdenv.hostPlatform.system}"; + # The downloaded archive also contains ARM binaries, but these have not been tested. + + vmwareHorizonClientFiles = stdenv.mkDerivation { + name = "vmwareHorizonClientFiles"; + inherit version; + src = fetchurl { + url = "https://download3.vmware.com/software/view/viewclients/CART22FQ2/VMware-Horizon-Client-Linux-2106.1-8.3.1-18435609.tar.gz"; + sha256 = "b42ddb9d7e9c8d0f8b86b69344fcfca45251c5a5f1e06a18a3334d5a04e18c39"; + }; + nativeBuildInputs = [ makeWrapper ]; + installPhase = '' + mkdir ext $out + find ${sysArch} -type f -print0 | xargs -0n1 tar -Cext --strip-components=1 -xf + mv ext/bin ext/lib ext/share "$out"/ + + # Horizon includes a copy of libstdc++ which is loaded via $LD_LIBRARY_PATH + # when it cannot detect a new enough version already present on the system. + # The checks are distribution-specific and do not function correctly on NixOS. + # Deleting the bundled library is the simplest way to force it to use our version. + rm "$out/lib/vmware/gcc/libstdc++.so.6" + + # This libjpeg library interferes with Chromium, so we will be using ours instead. + rm $out/lib/vmware/libjpeg.* + + # This library causes the program to core-dump occasionally. Use ours instead. + rm $out/lib/vmware/view/crtbora/libcairo.* + + # Force the default GTK theme (Adwaita) because Horizon is prone to + # UI usability issues when using non-default themes, such as Adwaita-dark. + makeWrapper "$out/bin/vmware-view" "$out/bin/vmware-view_wrapper" \ + --set GTK_THEME Adwaita \ + --suffix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \ + --suffix LD_LIBRARY_PATH : "$out/lib/vmware/view/crtbora:$out/lib/vmware" + ''; + }; + + vmwareFHSUserEnv = buildFHSUserEnv { + name = "vmware-view"; + + runScript = "${vmwareHorizonClientFiles}/bin/vmware-view_wrapper"; + + targetPkgs = pkgs: [ + at-spi2-atk + atk + cairo + dbus + fontconfig + freetype + gdk-pixbuf + glib + gtk2 + gtk3-x11 + harfbuzz + liberation_ttf + libjpeg + libtiff + libudev0-shim + libuuid + libX11 + libXcursor + libXext + libXi + libXinerama + libxkbfile + libxml2 + libXrandr + libXrender + libXScrnSaver + libXtst + pango + pcsclite + pixman + vmwareHorizonClientFiles + zlib + ]; + }; + + desktopItem = makeDesktopItem { + name = "vmware-view"; + desktopName = "VMware Horizon Client"; + icon = "${vmwareHorizonClientFiles}/share/icons/vmware-view.png"; + exec = "${vmwareFHSUserEnv}/bin/vmware-view %u"; + mimeType = "x-scheme-handler/vmware-view"; + }; + +in +stdenv.mkDerivation { + name = "vmware-view"; + + dontUnpack = true; + + installPhase = '' + mkdir -p $out/bin $out/share/applications + cp "${desktopItem}"/share/applications/* $out/share/applications/ + ln -s "${vmwareFHSUserEnv}/bin/vmware-view" "$out/bin/" + ''; + + unwrapped = vmwareHorizonClientFiles; + + passthru.updateScript = ./update.sh; + + meta = with lib; { + description = "Allows you to connect to your VMware Horizon virtual desktop"; + homepage = "https://www.vmware.com/go/viewclients"; + license = licenses.unfree; + platforms = platforms.linux; + maintainers = with maintainers; [ buckley310 ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/vmware-horizon-client/update.sh b/nixpkgs/pkgs/applications/networking/remote/vmware-horizon-client/update.sh new file mode 100755 index 000000000000..eec3d1de79e0 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/vmware-horizon-client/update.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env nix-shell +#!nix-shell -p curl -p jq -p common-updater-scripts -i bash +set -e + +entryPointURL='https://customerconnect.vmware.com/channel/public/api/v1.0/products/getRelatedDLGList?locale=en_US&category=desktop_end_user_computing&product=vmware_horizon_clients&version=horizon_8&dlgType=PRODUCT_BINARY' + +function getTarballMetaUrl { + curl "$entryPointURL" | jq -r ' + .dlgEditionsLists | .[] | select(.name | contains("Client for Linux")) | + .dlgList | .[] | select(.name | contains("tarball version")) | + @uri "https://customerconnect.vmware.com/channel/public/api/v1.0/dlg/details?locale=en_US&downloadGroup=\(.code)&productId=\(.productId)&rPId=\(.releasePackageId)" + ' +} + +meta="$( curl "$(getTarballMetaUrl)" | jq ".downloadFiles | .[]" )" + +ver="$( echo "$meta" | jq -r .version )" +url="$( echo "$meta" | jq -r .thirdPartyDownloadUrl )" +sum="$( echo "$meta" | jq -r .sha256checksum )" + +echo +echo "version: $ver" +echo "tar url: $url" +echo " sha256: $sum" + +cd "$(dirname "$0")/../../../../.." +update-source-version vmware-horizon-client.unwrapped "$ver" "$sum" "$url" diff --git a/nixpkgs/pkgs/applications/networking/remote/waypipe/default.nix b/nixpkgs/pkgs/applications/networking/remote/waypipe/default.nix new file mode 100644 index 000000000000..7be719c18037 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/waypipe/default.nix @@ -0,0 +1,38 @@ +{ lib, stdenv, fetchFromGitLab +, meson, ninja, pkg-config, scdoc +, mesa, lz4, zstd, ffmpeg, libva +}: + +stdenv.mkDerivation rec { + pname = "waypipe-unstable"; + version = "0.8.0"; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "mstoeckl"; + repo = "waypipe"; + rev = "v${version}"; + sha256 = "1qa47ljfvb1vv3h647xwn1j5j8gfmcmdfaz4j8ygnkvj36y87vnz"; + }; + + nativeBuildInputs = [ meson ninja pkg-config scdoc ]; + + buildInputs = [ + # Optional dependencies: + mesa lz4 zstd ffmpeg libva + ]; + + meta = with lib; { + description = "A network proxy for Wayland clients (applications)"; + longDescription = '' + waypipe is a proxy for Wayland clients. It forwards Wayland messages and + serializes changes to shared memory buffers over a single socket. This + makes application forwarding similar to ssh -X feasible. + ''; + homepage = "https://mstoeckl.com/notes/gsoc/blog.html"; + changelog = "https://gitlab.freedesktop.org/mstoeckl/waypipe/-/releases#v${version}"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/wayvnc/default.nix b/nixpkgs/pkgs/applications/networking/remote/wayvnc/default.nix new file mode 100644 index 000000000000..f5641c762ecb --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/wayvnc/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchFromGitHub, meson, pkg-config, ninja, scdoc, wayland-scanner +, pixman, libxkbcommon, wayland, neatvnc, libdrm, libX11, aml, pam +}: + +stdenv.mkDerivation rec { + pname = "wayvnc"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "any1"; + repo = pname; + rev = "v${version}"; + sha256 = "0q48fgh6gf3jicy4bk3kq18h9lhqfq9qz32ri6j9ffvbb8mcw64s"; + }; + + nativeBuildInputs = [ meson pkg-config ninja scdoc wayland-scanner ]; + buildInputs = [ pixman libxkbcommon wayland neatvnc libdrm libX11 aml pam ]; + + meta = with lib; { + description = "A VNC server for wlroots based Wayland compositors"; + longDescription = '' + This is a VNC server for wlroots based Wayland compositors. It attaches + to a running Wayland session, creates virtual input devices and exposes a + single display via the RFB protocol. The Wayland session may be a + headless one, so it is also possible to run wayvnc without a physical + display attached. + ''; + inherit (src.meta) homepage; + changelog = "https://github.com/any1/wayvnc/releases/tag/v${version}"; + license = licenses.isc; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/x2goclient/default.nix b/nixpkgs/pkgs/applications/networking/remote/x2goclient/default.nix new file mode 100644 index 000000000000..dfed1f590758 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/x2goclient/default.nix @@ -0,0 +1,38 @@ +{ lib, fetchurl, cups, libssh, libXpm, nx-libs, openldap, openssh +, mkDerivation, qtbase, qtsvg, qtx11extras, qttools, phonon, pkg-config }: + +mkDerivation rec { + pname = "x2goclient"; + version = "4.1.2.2"; + + src = fetchurl { + url = "https://code.x2go.org/releases/source/${pname}/${pname}-${version}.tar.gz"; + sha256 = "yZUyZ8QPpnEZrZanO6yx8mYZbaIFnwzc0bjVGZQh0So="; + }; + + buildInputs = [ cups libssh libXpm nx-libs openldap openssh + qtbase qtsvg qtx11extras qttools phonon pkg-config ]; + + postPatch = '' + substituteInPlace src/onmainwindow.cpp --replace "/usr/sbin/sshd" "${openssh}/bin/sshd" + substituteInPlace Makefile \ + --replace "SHELL=/bin/bash" "SHELL=$SHELL" \ + --replace "lrelease-qt4" "${qttools.dev}/bin/lrelease" \ + --replace "qmake-qt4" "${qtbase.dev}/bin/qmake" \ + --replace "-o root -g root" "" + ''; + + makeFlags = [ "PREFIX=$(out)" "ETCDIR=$(out)/etc" "build_client" "build_man" ]; + + installTargets = [ "install_client" "install_man" ]; + + qtWrapperArgs = [ "--suffix PATH : ${nx-libs}/bin:${openssh}/libexec" ]; + + meta = with lib; { + description = "Graphical NoMachine NX3 remote desktop client"; + homepage = "http://x2go.org/"; + maintainers = with maintainers; [ mkg20001 ]; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/x2goserver/default.nix b/nixpkgs/pkgs/applications/networking/remote/x2goserver/default.nix new file mode 100644 index 000000000000..6d7923872ec9 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/x2goserver/default.nix @@ -0,0 +1,93 @@ +{ stdenv, lib, fetchurl, perlPackages, makeWrapper, perl, which, nx-libs +, util-linux, coreutils, glibc, gawk, gnused, gnugrep, findutils, xorg +, nettools, iproute2, bc, procps, psmisc, lsof, pwgen, openssh, sshfs, bash +}: + +let + pname = "x2goserver"; + version = "4.1.0.3"; + + src = fetchurl { + url = "https://code.x2go.org/releases/source/${pname}/${pname}-${version}.tar.gz"; + sha256 = "Z3aqo1T1pE40nws8F21JiMiKYYwu30bJijeuicBp3NA="; + }; + + x2go-perl = perlPackages.buildPerlPackage rec { + pname = "X2Go"; + inherit version src; + makeFlags = [ "-f" "Makefile.perl" ]; + patchPhase = '' + substituteInPlace X2Go/Config.pm --replace '/etc/x2go' '/var/lib/x2go/conf' + substituteInPlace X2Go/Server/DB.pm \ + --replace '$x2go_lib_path/libx2go-server-db-sqlite3-wrapper' \ + '/run/wrappers/bin/x2gosqliteWrapper' + substituteInPlace X2Go/Server/DB/SQLite3.pm --replace "user='x2gouser'" "user='x2go'" + ''; + }; + + perlEnv = perl.withPackages (p: with p; [ + x2go-perl DBI DBDSQLite FileBaseDir TryTiny CaptureTiny ConfigSimple Switch FileWhich + ]); + + binaryDeps = [ + perlEnv which nx-libs util-linux coreutils glibc.bin gawk gnused gnugrep + findutils nettools iproute2 bc procps psmisc lsof pwgen openssh sshfs + xorg.xauth xorg.xinit xorg.xrandr xorg.xmodmap xorg.xwininfo xorg.fontutil + xorg.xkbcomp xorg.setxkbmap + ]; +in +stdenv.mkDerivation rec { + inherit pname version src; + + buildInputs = [ perlEnv bash ]; + + nativeBuildInputs = [ makeWrapper ]; + + prePatch = '' + patchShebangs . + sed -i '/Makefile.PL\|Makefile.perl/d' Makefile + for i in */Makefile; do + substituteInPlace "$i" --replace "-o root -g root " "" + done + substituteInPlace libx2go-server-db-perl/Makefile --replace "chmod 2755" "chmod 755" + for i in x2goserver/sbin/x2godbadmin x2goserver/bin/x2go* + do + substituteInPlace $i --replace '/etc/x2go' '/var/lib/x2go/conf' + done + substituteInPlace x2goserver/sbin/x2gocleansessions \ + --replace '/var/run/x2goserver.pid' '/var/run/x2go/x2goserver.pid' + substituteInPlace x2goserver/sbin/x2godbadmin --replace 'user="x2gouser"' 'user="x2go"' + substituteInPlace x2goserver-xsession/etc/Xsession \ + --replace "SSH_AGENT /bin/bash -c" "SSH_AGENT ${bash}/bin/bash -c" \ + --replace "[ -f /etc/redhat-release ]" "[ -d /etc/nix ] || [ -f /etc/redhat-release ]" + ''; + + makeFlags = [ "PREFIX=/" "NXLIBDIR=${nx-libs}/lib/nx" ]; + + installFlags = [ "DESTDIR=$(out)" ]; + + postInstall = '' + mv $out/etc/x2go/x2goserver.conf{,.example} + mv $out/etc/x2go/x2goagent.options{,.example} + ln -sf ${nx-libs}/bin/nxagent $out/bin/x2goagent + for i in $out/sbin/x2go* $(find $out/bin -type f) \ + $(ls $out/lib/x2go/x2go* | grep -v x2gocheckport) + do + wrapProgram $i --prefix PATH : ${lib.makeBinPath binaryDeps}:$out + done + # We're patching @INC of the setgid wrapper, because we can't mix + # the perl wrapper (for PERL5LIB) with security.wrappers (for setgid) + sed -ie "s,.\+bin/perl,#!${perl}/bin/perl -I ${perlEnv}/lib/perl5/site_perl," \ + $out/lib/x2go/libx2go-server-db-sqlite3-wrapper.pl + ''; + + enableParallelBuilding = true; + + meta = with lib; { + description = "Remote desktop application, server component"; + homepage = "http://x2go.org/"; + platforms = lib.platforms.linux; + license = licenses.gpl2; + maintainers = with maintainers; [ averelld mkg20001 ]; + }; +} diff --git a/nixpkgs/pkgs/applications/networking/remote/xrdp/default.nix b/nixpkgs/pkgs/applications/networking/remote/xrdp/default.nix new file mode 100644 index 000000000000..b8677a2683c0 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/remote/xrdp/default.nix @@ -0,0 +1,105 @@ +{ lib, stdenv, fetchFromGitHub, pkg-config, which, perl, autoconf, automake, libtool, openssl, systemd, pam, fuse, libjpeg, libopus, nasm, xorg }: + +let + xorgxrdp = stdenv.mkDerivation rec { + pname = "xorgxrdp"; + version = "0.2.9"; + + src = fetchFromGitHub { + owner = "neutrinolabs"; + repo = "xorgxrdp"; + rev = "v${version}"; + sha256 = "1bhp5x47hajhinvglmc4vxxnpjvfjm6369njb3ghqfr7c5xypvzr"; + }; + + nativeBuildInputs = [ pkg-config autoconf automake which libtool nasm ]; + + buildInputs = [ xorg.xorgserver ]; + + postPatch = '' + # patch from Debian, allows to run xrdp daemon under unprivileged user + substituteInPlace module/rdpClientCon.c \ + --replace 'g_sck_listen(dev->listen_sck);' 'g_sck_listen(dev->listen_sck); g_chmod_hex(dev->uds_data, 0x0660);' + + substituteInPlace configure.ac \ + --replace 'moduledir=`pkg-config xorg-server --variable=moduledir`' "moduledir=$out/lib/xorg/modules" \ + --replace 'sysconfdir="/etc"' "sysconfdir=$out/etc" + ''; + + preConfigure = "./bootstrap"; + + configureFlags = [ "XRDP_CFLAGS=-I${xrdp.src}/common" ]; + + enableParallelBuilding = true; + }; + + xrdp = stdenv.mkDerivation rec { + version = "0.9.9"; + pname = "xrdp"; + + src = fetchFromGitHub { + owner = "volth"; + repo = "xrdp"; + rev = "refs/tags/runtime-cfg-path-${version}"; # Fixes https://github.com/neutrinolabs/xrdp/issues/609; not a patch on top of the official repo because "xorgxrdp.configureFlags" above includes "xrdp.src" which must be patched already + fetchSubmodules = true; + sha256 = "0ynj6pml4f38y8571ryhifza57wfqg4frdrjcwzw3fmryiznfm1z"; + }; + + nativeBuildInputs = [ pkg-config autoconf automake which libtool nasm ]; + + buildInputs = [ openssl systemd pam fuse libjpeg libopus xorg.libX11 xorg.libXfixes xorg.libXrandr ]; + + postPatch = '' + substituteInPlace sesman/xauth.c --replace "xauth -q" "${xorg.xauth}/bin/xauth -q" + ''; + + preConfigure = '' + (cd librfxcodec && ./bootstrap && ./configure --prefix=$out --enable-static --disable-shared) + ./bootstrap + ''; + dontDisableStatic = true; + configureFlags = [ "--with-systemdsystemunitdir=/var/empty" "--enable-ipv6" "--enable-jpeg" "--enable-fuse" "--enable-rfxcodec" "--enable-opus" ]; + + installFlags = [ "DESTDIR=$(out)" "prefix=" ]; + + postInstall = '' + # remove generated keys (as non-determenistic) and upstart script + rm $out/etc/xrdp/{rsakeys.ini,key.pem,cert.pem,xrdp.sh} + + cp $src/keygen/openssl.conf $out/share/xrdp/openssl.conf + + substituteInPlace $out/etc/xrdp/sesman.ini --replace /etc/xrdp/pulse $out/etc/xrdp/pulse + + # remove all session types except Xorg (they are not supported by this setup) + ${perl}/bin/perl -i -ne 'print unless /\[(X11rdp|Xvnc|console|vnc-any|sesman-any|rdp-any|neutrinordp-any)\]/ .. /^$/' $out/etc/xrdp/xrdp.ini + + # remove all session types and then add Xorg + ${perl}/bin/perl -i -ne 'print unless /\[(X11rdp|Xvnc|Xorg)\]/ .. /^$/' $out/etc/xrdp/sesman.ini + + cat >> $out/etc/xrdp/sesman.ini <<EOF + + [Xorg] + param=${xorg.xorgserver}/bin/Xorg + param=-modulepath + param=${xorgxrdp}/lib/xorg/modules,${xorg.xorgserver}/lib/xorg/modules + param=-config + param=${xorgxrdp}/etc/X11/xrdp/xorg.conf + param=-noreset + param=-nolisten + param=tcp + param=-logfile + param=.xorgxrdp.%s.log + EOF + ''; + + enableParallelBuilding = true; + + meta = with lib; { + description = "An open source RDP server"; + homepage = "https://github.com/neutrinolabs/xrdp"; + license = licenses.asl20; + maintainers = [ maintainers.volth ]; + platforms = platforms.linux; + }; + }; +in xrdp |