about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2020-04-15 07:22:29 +0200
committerGitHub <noreply@github.com>2020-04-15 07:22:29 +0200
commit1d8a8d0359a938d24b57de854e169acf2468ffb1 (patch)
tree78e6ef1ddd1b66b2d5f9b3c06f08826427342e87 /pkgs/applications
parent36b48140d6434a7def6ec7d9663590c1491f4a08 (diff)
parent8f89b0cd0e9a68f71fb6fd746750a742f99c912c (diff)
downloadnixlib-1d8a8d0359a938d24b57de854e169acf2468ffb1.tar
nixlib-1d8a8d0359a938d24b57de854e169acf2468ffb1.tar.gz
nixlib-1d8a8d0359a938d24b57de854e169acf2468ffb1.tar.bz2
nixlib-1d8a8d0359a938d24b57de854e169acf2468ffb1.tar.lz
nixlib-1d8a8d0359a938d24b57de854e169acf2468ffb1.tar.xz
nixlib-1d8a8d0359a938d24b57de854e169acf2468ffb1.tar.zst
nixlib-1d8a8d0359a938d24b57de854e169acf2468ffb1.zip
Merge pull request #85262 from peterhoeg/t/freerdp
freerdp: re-enable tests except for one failing test
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/networking/remote/freerdp/default.nix121
1 files changed, 75 insertions, 46 deletions
diff --git a/pkgs/applications/networking/remote/freerdp/default.nix b/pkgs/applications/networking/remote/freerdp/default.nix
index 655a8e7102d5..be8810dfa7fc 100644
--- a/pkgs/applications/networking/remote/freerdp/default.nix
+++ b/pkgs/applications/networking/remote/freerdp/default.nix
@@ -1,34 +1,41 @@
-{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig
-, alsaLib, ffmpeg, glib, openssl, pcre, zlib
-, libX11, libXcursor, libXdamage, libXext, libXi, libXinerama, libXrandr, libXrender, libXv, libXtst
-, libxkbcommon, libxkbfile
-, wayland
-, gstreamer, gst-plugins-base, gst-plugins-good, libunwind, orc
-, libxslt
-, libusb1
-, libpulseaudio ? null
-, cups ? null
-, pcsclite ? null
-, systemd ? null
-, buildServer ? true
-, nocaps ? false
-}:
+{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, alsaLib, ffmpeg, glib, openssl
+, pcre, zlib, libX11, libXcursor, libXdamage, libXext, libXi, libXinerama
+, libXrandr, libXrender, libXv, libXtst, libxkbcommon, libxkbfile, wayland
+, gstreamer, gst-plugins-base, gst-plugins-good, libunwind, orc, 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";
   version = "2.0.0";
 
   src = fetchFromGitHub {
-    owner  = "FreeRDP";
-    repo   = "FreeRDP";
-    rev    = version;
+    owner = "FreeRDP";
+    repo = "FreeRDP";
+    rev = version;
     sha256 = "0d2559v0z1jnq6jlrvsgdf8p6gd27m8kwdnxckl1x0ygaxs50bqc";
   };
 
-  # outputs = [ "bin" "out" "dev" ];
-
-  prePatch = ''
+  postPatch = ''
     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" \
       --replace "Requires:" "Requires: @WINPR_PKG_CONFIG_FILENAME@"
   '' + lib.optionalString (pcsclite != null) ''
@@ -39,32 +46,54 @@ stdenv.mkDerivation rec {
       --replace "RDP_SCANCODE_CAPSLOCK" "RDP_SCANCODE_LCONTROL"
   '';
 
-  buildInputs = with lib; [
-    alsaLib cups ffmpeg glib openssl pcre pcsclite libpulseaudio zlib
-    gstreamer gst-plugins-base gst-plugins-good libunwind orc
-    libX11 libXcursor libXdamage libXext libXi libXinerama libXrandr libXrender libXv libXtst
-    libxkbcommon libxkbfile
-    wayland libusb1
-    libxslt
-  ] ++ optional stdenv.isLinux systemd;
-
-  nativeBuildInputs = [
-    cmake pkgconfig
-  ];
+  buildInputs = with lib;
+    [
+      alsaLib
+      cups
+      ffmpeg
+      glib
+      gst-plugins-base
+      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;
 
-  enableParallelBuilding = true;
+  nativeBuildInputs = [ cmake pkgconfig ];
 
-  doCheck = false;
+  doCheck = true;
 
-  cmakeFlags = with lib; [
-    "-DCMAKE_INSTALL_LIBDIR=lib"
-    "-DWITH_CUNIT=OFF"
-    "-DWITH_OSS=OFF"
-  ] ++ optional (libpulseaudio != null)       "-DWITH_PULSE=ON"
-    ++ optional (cups != null)                "-DWITH_CUPS=ON"
-    ++ optional (pcsclite != null)            "-DWITH_PCSC=ON"
-    ++ optional buildServer                   "-DWITH_SERVER=ON"
-    ++ optional (stdenv.isx86_64)             "-DWITH_SSE2=ON";
+  cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ]
+    ++ lib.mapAttrsToList (k: v: "-D${k}=${if v then "ON" else "OFF"}") {
+      BUILD_TESTING = doCheck;
+      WITH_CUNIT = doCheck;
+      WITH_CUPS = (cups != null);
+      WITH_OSS = false;
+      WITH_PCSC = (pcsclite != null);
+      WITH_PULSE = (libpulseaudio != null);
+      WITH_SERVER = buildServer;
+      WITH_SSE2 = stdenv.isx86_64;
+    };
 
   meta = with lib; {
     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)
       following the Microsoft Open Specifications.
     '';
-    homepage = "http://www.freerdp.com/";
+    homepage = "https://www.freerdp.com/";
     license = licenses.asl20;
     maintainers = with maintainers; [ peterhoeg lheckemann ];
     platforms = platforms.unix;