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

xrdp: add update script
This commit is contained in:
Weijia Wang
2024-05-14 10:56:47 +02:00
committed by GitHub
2 changed files with 30 additions and 19 deletions

View File

@@ -19,22 +19,11 @@
, lame , lame
, pixman , pixman
, libjpeg_turbo , libjpeg_turbo
, _experimental-update-script-combinators
, gitUpdater
}: }:
let 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 { xorgxrdp = stdenv.mkDerivation rec {
pname = "xorgxrdp"; pname = "xorgxrdp";
version = "0.9.20"; version = "0.9.20";
@@ -62,16 +51,29 @@ let
preConfigure = "./bootstrap"; preConfigure = "./bootstrap";
configureFlags = [ "XRDP_CFLAGS=-I${patchedXrdpSrc}/common" ]; configureFlags = [ "XRDP_CFLAGS=-I${xrdp.src}/common" ];
enableParallelBuilding = true; enableParallelBuilding = true;
passthru.updateScript = gitUpdater { rev-prefix = "v"; };
}; };
xrdp = stdenv.mkDerivation { xrdp = stdenv.mkDerivation rec {
inherit version;
pname = "xrdp"; 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 ]; nativeBuildInputs = [ pkg-config autoconf automake which libtool nasm perl ];
@@ -150,6 +152,15 @@ let
enableParallelBuilding = true; 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; { meta = with lib; {
description = "An open source RDP server"; description = "An open source RDP server";
homepage = "https://github.com/neutrinolabs/xrdp"; homepage = "https://github.com/neutrinolabs/xrdp";

View File

@@ -1,11 +1,11 @@
{ stdenv { stdenv
, fetchFromGitHub , fetchFromGitHub
, lib , lib
, nix-update-script
, pulseaudio , pulseaudio
, autoreconfHook , autoreconfHook
, pkg-config , pkg-config
, nixosTests , nixosTests
, gitUpdater
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
]; ];
passthru = { passthru = {
updateScript = nix-update-script { }; updateScript = gitUpdater { rev-prefix = "v"; };
tests = { tests = {
inherit (nixosTests) xrdp-with-audio-pulseaudio; inherit (nixosTests) xrdp-with-audio-pulseaudio;
}; };