Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

110 строки
2.9 KiB

  1. { stdenv, lib, fetchFromGitHub, cmake, pkgconfig, alsaLib, ffmpeg, glib, openssl
  2. , pcre, zlib, libX11, libXcursor, libXdamage, libXext, libXi, libXinerama
  3. , libXrandr, libXrender, libXv, libXtst, libxkbcommon, libxkbfile, wayland
  4. , gstreamer, gst-plugins-base, gst-plugins-good, libunwind, orc, libxslt
  5. , libusb1, libpulseaudio ? null, cups ? null, pcsclite ? null, systemd ? null
  6. , buildServer ? true, nocaps ? false }:
  7. let
  8. cmFlag = flag: if flag then "ON" else "OFF";
  9. disabledTests = [
  10. # this one is probably due to our sandbox
  11. {
  12. dir = "libfreerdp/crypto/test";
  13. file = "Test_x509_cert_info.c";
  14. }
  15. ];
  16. in stdenv.mkDerivation rec {
  17. pname = "freerdp";
  18. version = "2.1.1";
  19. src = fetchFromGitHub {
  20. owner = "FreeRDP";
  21. repo = "FreeRDP";
  22. rev = version;
  23. sha256 = "1avfsx837rjfk50qv3xjccx2309phn04rq6imadqvqpfnyx4ma66";
  24. };
  25. postPatch = ''
  26. export HOME=$TMP
  27. # failing test(s)
  28. ${lib.concatMapStringsSep "\n" (e: ''
  29. substituteInPlace ${e.dir}/CMakeLists.txt \
  30. --replace ${e.file} ""
  31. rm ${e.dir}/${e.file}
  32. '') disabledTests}
  33. substituteInPlace "libfreerdp/freerdp.pc.in" \
  34. --replace "Requires:" "Requires: @WINPR_PKG_CONFIG_FILENAME@"
  35. '' + lib.optionalString (pcsclite != null) ''
  36. substituteInPlace "winpr/libwinpr/smartcard/smartcard_pcsc.c" \
  37. --replace "libpcsclite.so" "${lib.getLib pcsclite}/lib/libpcsclite.so"
  38. '' + lib.optionalString nocaps ''
  39. substituteInPlace "libfreerdp/locale/keyboard_xkbfile.c" \
  40. --replace "RDP_SCANCODE_CAPSLOCK" "RDP_SCANCODE_LCONTROL"
  41. '';
  42. buildInputs = with lib;
  43. [
  44. alsaLib
  45. cups
  46. ffmpeg
  47. glib
  48. gst-plugins-base
  49. gst-plugins-good
  50. gstreamer
  51. libX11
  52. libXcursor
  53. libXdamage
  54. libXext
  55. libXi
  56. libXinerama
  57. libXrandr
  58. libXrender
  59. libXtst
  60. libXv
  61. libpulseaudio
  62. libunwind
  63. libusb1
  64. libxkbcommon
  65. libxkbfile
  66. libxslt
  67. openssl
  68. orc
  69. pcre
  70. pcsclite
  71. wayland
  72. zlib
  73. ] ++ optional stdenv.isLinux systemd;
  74. nativeBuildInputs = [ cmake pkgconfig ];
  75. doCheck = true;
  76. cmakeFlags = [ "-DCMAKE_INSTALL_LIBDIR=lib" ]
  77. ++ lib.mapAttrsToList (k: v: "-D${k}=${if v then "ON" else "OFF"}") {
  78. BUILD_TESTING = doCheck;
  79. WITH_CUNIT = doCheck;
  80. WITH_CUPS = (cups != null);
  81. WITH_OSS = false;
  82. WITH_PCSC = (pcsclite != null);
  83. WITH_PULSE = (libpulseaudio != null);
  84. WITH_SERVER = buildServer;
  85. WITH_SSE2 = stdenv.isx86_64;
  86. };
  87. meta = with lib; {
  88. description = "A Remote Desktop Protocol Client";
  89. longDescription = ''
  90. FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP)
  91. following the Microsoft Open Specifications.
  92. '';
  93. homepage = "https://www.freerdp.com/";
  94. license = licenses.asl20;
  95. maintainers = with maintainers; [ peterhoeg lheckemann ];
  96. platforms = platforms.unix;
  97. };
  98. }