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
commit 40defe43b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 30 additions and 19 deletions

View File

@ -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";

View File

@ -1,11 +1,11 @@
{ 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;
};