Commit 7599e900 authored by Charlotte Van Petegem's avatar Charlotte Van Petegem Committed by Alyssa Ross
Browse files

xrdp: use patched xrdp sources when building xorgxrdp

parent 8e051ccc
Loading
Loading
Loading
Loading
+17 −13
Original line number Diff line number Diff line
{ 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"
    '';