Unverified Commit 40defe43 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

Merge pull request #311434 from lucasew/20240513-xrdp-and-friends

xrdp: add update script
parents e2f656a1 7773daec
Loading
Loading
Loading
Loading
+29 −18
Original line number Diff line number Diff line
@@ -19,22 +19,11 @@
, lame
, pixman
, libjpeg_turbo
, _experimental-update-script-combinators
, gitUpdater
}:

let
  version = "0.9.25.1";
  patchedXrdpSrc = applyPatches {
    patches = [ ./dynamic_config.patch ];
    name = "xrdp-patched-${version}";
    src = fetchFromGitHub {
      owner = "neutrinolabs";
      repo = "xrdp";
      rev = "v${version}";
      fetchSubmodules = true;
      hash = "sha256-oAs0oWkCyj3ObdJuHLfT25ZzkTrxNAXDiFU64OOP4Ow=";
    };
  };

  xorgxrdp = stdenv.mkDerivation rec {
    pname = "xorgxrdp";
    version = "0.9.20";
@@ -62,16 +51,29 @@ let

    preConfigure = "./bootstrap";

    configureFlags = [ "XRDP_CFLAGS=-I${patchedXrdpSrc}/common"  ];
    configureFlags = [ "XRDP_CFLAGS=-I${xrdp.src}/common"  ];

    enableParallelBuilding = true;

    passthru.updateScript = gitUpdater { rev-prefix = "v"; };
  };

  xrdp = stdenv.mkDerivation {
    inherit version;
  xrdp = stdenv.mkDerivation rec {
    pname = "xrdp";
    version = "0.9.25.1";

    src = patchedXrdpSrc;
    src = applyPatches {
      inherit version;
      patches = [ ./dynamic_config.patch ];
      name = "xrdp-patched-${version}";
      src = fetchFromGitHub {
        owner = "neutrinolabs";
        repo = "xrdp";
        rev = "v${version}";
        fetchSubmodules = true;
        hash = "sha256-oAs0oWkCyj3ObdJuHLfT25ZzkTrxNAXDiFU64OOP4Ow=";
      };
    };

    nativeBuildInputs = [ pkg-config autoconf automake which libtool nasm perl ];

@@ -150,6 +152,15 @@ let

    enableParallelBuilding = true;

    passthru = {
      inherit xorgxrdp;
      updateScript = _experimental-update-script-combinators.sequence (map (item: item.command) [
        (gitUpdater { rev-prefix = "v"; attrPath = "xrdp.src"; ignoredVersions = [ "beta" ]; })
        { command = ["rm" "update-git-commits.txt"]; }
        (gitUpdater { rev-prefix = "v"; attrPath = "xrdp.xorgxrdp"; })
      ]);
    };

    meta = with lib; {
      description = "An open source RDP server";
      homepage = "https://github.com/neutrinolabs/xrdp";
+2 −2
Original line number Diff line number Diff line
{ stdenv
, fetchFromGitHub
, lib
, nix-update-script
, pulseaudio
, autoreconfHook
, pkg-config
, nixosTests
, gitUpdater
}:

stdenv.mkDerivation rec {
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
  ];

  passthru = {
    updateScript = nix-update-script { };
    updateScript = gitUpdater { rev-prefix = "v"; };
    tests = {
      inherit (nixosTests) xrdp-with-audio-pulseaudio;
    };