diff --git a/pkgs/applications/networking/remote/xrdp/default.nix b/pkgs/applications/networking/remote/xrdp/default.nix index c440b9e5a76e..e9f21dc9e689 100644 --- a/pkgs/applications/networking/remote/xrdp/default.nix +++ b/pkgs/applications/networking/remote/xrdp/default.nix @@ -1,6 +1,19 @@ -{ lib, stdenv, fetchFromGitHub, pkg-config, which, perl, autoconf, automake, libtool, openssl, systemd, pam, fuse, libjpeg, libopus, nasm, xorg }: +{ lib, stdenv, fetchFromGitHub, applyPatches, pkg-config, which, perl, autoconf, automake, libtool, openssl, systemd, pam, fuse, libjpeg, libopus, nasm, xorg }: let + version = "0.9.23"; + patchedXrdpSrc = applyPatches { + patches = [ ./dynamic_config.patch ]; + name = "xrdp-patched-${version}"; + src = fetchFromGitHub { + owner = "neutrinolabs"; + repo = "xrdp"; + rev = "v${version}"; + fetchSubmodules = true; + hash = "sha256-8gAP4wOqSmar8JhKRt4qRRwh23coIn0Q8Tt9ClHQSt8="; + }; + }; + xorgxrdp = stdenv.mkDerivation rec { pname = "xorgxrdp"; version = "0.9.19"; @@ -28,29 +41,20 @@ let preConfigure = "./bootstrap"; - configureFlags = [ "XRDP_CFLAGS=-I${xrdp.src}/common" ]; + configureFlags = [ "XRDP_CFLAGS=-I${patchedXrdpSrc}/common" ]; enableParallelBuilding = true; }; - xrdp = stdenv.mkDerivation rec { - version = "0.9.23"; + inherit version; pname = "xrdp"; - src = fetchFromGitHub { - owner = "neutrinolabs"; - repo = "xrdp"; - rev = "v${version}"; - fetchSubmodules = true; - hash = "sha256-14qsRfLn+26rm+vyMmOtaBEs8mWfSTIsIVseSC2FjXc="; - }; + src = patchedXrdpSrc; nativeBuildInputs = [ pkg-config autoconf automake which libtool nasm perl ]; buildInputs = [ openssl systemd pam fuse libjpeg libopus xorg.libX11 xorg.libXfixes xorg.libXrandr ]; - patches = [ ./dynamic_config.patch ]; - postPatch = '' substituteInPlace sesman/xauth.c --replace "xauth -q" "${xorg.xauth}/bin/xauth -q" '';