Merge pull request #85262 from peterhoeg/t/freerdp
freerdp: re-enable tests except for one failing test
This commit is contained in:
commit
1d8a8d0359
1 changed files with 75 additions and 46 deletions
|
@ -1,34 +1,41 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig
|
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, alsaLib, ffmpeg, glib, openssl
|
||||||
, alsaLib, ffmpeg, glib, openssl, pcre, zlib
|
, pcre, zlib, libX11, libXcursor, libXdamage, libXext, libXi, libXinerama
|
||||||
, libX11, libXcursor, libXdamage, libXext, libXi, libXinerama, libXrandr, libXrender, libXv, libXtst
|
, libXrandr, libXrender, libXv, libXtst, libxkbcommon, libxkbfile, wayland
|
||||||
, libxkbcommon, libxkbfile
|
, gstreamer, gst-plugins-base, gst-plugins-good, libunwind, orc, libxslt
|
||||||
, wayland
|
, libusb1, libpulseaudio ? null, cups ? null, pcsclite ? null, systemd ? null
|
||||||
, gstreamer, gst-plugins-base, gst-plugins-good, libunwind, orc
|
, buildServer ? true, nocaps ? false }:
|
||||||
, libxslt
|
|
||||||
, libusb1
|
|
||||||
, libpulseaudio ? null
|
|
||||||
, cups ? null
|
|
||||||
, pcsclite ? null
|
|
||||||
, systemd ? null
|
|
||||||
, buildServer ? true
|
|
||||||
, nocaps ? false
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
|
cmFlag = flag: if flag then "ON" else "OFF";
|
||||||
|
disabledTests = [
|
||||||
|
# this one is probably due to our sandbox
|
||||||
|
{
|
||||||
|
dir = "libfreerdp/crypto/test";
|
||||||
|
file = "Test_x509_cert_info.c";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
pname = "freerdp";
|
pname = "freerdp";
|
||||||
version = "2.0.0";
|
version = "2.0.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "FreeRDP";
|
owner = "FreeRDP";
|
||||||
repo = "FreeRDP";
|
repo = "FreeRDP";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0d2559v0z1jnq6jlrvsgdf8p6gd27m8kwdnxckl1x0ygaxs50bqc";
|
sha256 = "0d2559v0z1jnq6jlrvsgdf8p6gd27m8kwdnxckl1x0ygaxs50bqc";
|
||||||
};
|
};
|
||||||
|
|
||||||
# outputs = [ "bin" "out" "dev" ];
|
postPatch = ''
|
||||||
|
|
||||||
prePatch = ''
|
|
||||||
export HOME=$TMP
|
export HOME=$TMP
|
||||||
|
|
||||||
|
# failing test(s)
|
||||||
|
${lib.concatMapStringsSep "\n" (e: ''
|
||||||
|
substituteInPlace ${e.dir}/CMakeLists.txt \
|
||||||
|
--replace ${e.file} ""
|
||||||
|
rm ${e.dir}/${e.file}
|
||||||
|
'') disabledTests}
|
||||||
|
|
||||||
substituteInPlace "libfreerdp/freerdp.pc.in" \
|
substituteInPlace "libfreerdp/freerdp.pc.in" \
|
||||||
--replace "Requires:" "Requires: @WINPR_PKG_CONFIG_FILENAME@"
|
--replace "Requires:" "Requires: @WINPR_PKG_CONFIG_FILENAME@"
|
||||||
'' + lib.optionalString (pcsclite != null) ''
|
'' + lib.optionalString (pcsclite != null) ''
|
||||||
|
@ -39,32 +46,54 @@ stdenv.mkDerivation rec {
|
||||||
--replace "RDP_SCANCODE_CAPSLOCK" "RDP_SCANCODE_LCONTROL"
|
--replace "RDP_SCANCODE_CAPSLOCK" "RDP_SCANCODE_LCONTROL"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = with lib; [
|
buildInputs = with lib;
|
||||||
alsaLib cups ffmpeg glib openssl pcre pcsclite libpulseaudio zlib
|
[
|
||||||
gstreamer gst-plugins-base gst-plugins-good libunwind orc
|
alsaLib
|
||||||
libX11 libXcursor libXdamage libXext libXi libXinerama libXrandr libXrender libXv libXtst
|
cups
|
||||||
libxkbcommon libxkbfile
|
ffmpeg
|
||||||
wayland libusb1
|
glib
|
||||||
libxslt
|
gst-plugins-base
|
||||||
] ++ optional stdenv.isLinux systemd;
|
gst-plugins-good
|
||||||
|
gstreamer
|
||||||
|
libX11
|
||||||
|
libXcursor
|
||||||
|
libXdamage
|
||||||
|
libXext
|
||||||
|
libXi
|
||||||
|
libXinerama
|
||||||
|
libXrandr
|
||||||
|
libXrender
|
||||||
|
libXtst
|
||||||
|
libXv
|
||||||
|
libpulseaudio
|
||||||
|
libunwind
|
||||||
|
libusb1
|
||||||
|
libxkbcommon
|
||||||
|
libxkbfile
|
||||||
|
libxslt
|
||||||
|
openssl
|
||||||
|
orc
|
||||||
|
pcre
|
||||||
|
pcsclite
|
||||||
|
wayland
|
||||||
|
zlib
|
||||||
|
] ++ optional stdenv.isLinux systemd;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
cmake pkgconfig
|
|
||||||
];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
doCheck = true;
|
||||||
|
|
||||||
doCheck = false;
|
cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ]
|
||||||
|
++ lib.mapAttrsToList (k: v: "-D${k}=${if v then "ON" else "OFF"}") {
|
||||||
cmakeFlags = with lib; [
|
BUILD_TESTING = doCheck;
|
||||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
WITH_CUNIT = doCheck;
|
||||||
"-DWITH_CUNIT=OFF"
|
WITH_CUPS = (cups != null);
|
||||||
"-DWITH_OSS=OFF"
|
WITH_OSS = false;
|
||||||
] ++ optional (libpulseaudio != null) "-DWITH_PULSE=ON"
|
WITH_PCSC = (pcsclite != null);
|
||||||
++ optional (cups != null) "-DWITH_CUPS=ON"
|
WITH_PULSE = (libpulseaudio != null);
|
||||||
++ optional (pcsclite != null) "-DWITH_PCSC=ON"
|
WITH_SERVER = buildServer;
|
||||||
++ optional buildServer "-DWITH_SERVER=ON"
|
WITH_SSE2 = stdenv.isx86_64;
|
||||||
++ optional (stdenv.isx86_64) "-DWITH_SSE2=ON";
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A Remote Desktop Protocol Client";
|
description = "A Remote Desktop Protocol Client";
|
||||||
|
@ -72,7 +101,7 @@ stdenv.mkDerivation rec {
|
||||||
FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP)
|
FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP)
|
||||||
following the Microsoft Open Specifications.
|
following the Microsoft Open Specifications.
|
||||||
'';
|
'';
|
||||||
homepage = "http://www.freerdp.com/";
|
homepage = "https://www.freerdp.com/";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ peterhoeg lheckemann ];
|
maintainers = with maintainers; [ peterhoeg lheckemann ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
|
Loading…
Reference in a new issue