@@ -1,67 +1,76 @@
1−{ stdenv
2−, fetchurl
3−, cmake
4−, openssl
5−, printerSupport ? true, cups
6−, pkgconfig
7−, zlib
8−, libX11
9−, libXcursor
10−, libXdamage
11−, libXext
12−, alsaLib
13−, ffmpeg
14−, libxkbfile
15−#, xmlto, docbook_xml_dtd_412, docbook_xml_xslt
16−, libXinerama
17−, libXv
18−, pulseaudioSupport ? true, libpulseaudio
1+{ stdenv, lib, fetchFromGitHub, substituteAll, cmake, pkgconfig
2+, alsaLib, ffmpeg_2, glib, openssl, pcre, zlib
3+, libX11, libXcursor, libXdamage, libXext, libXi, libXinerama, libXrandr, libXrender, libXv
4+, libxkbcommon, libxkbfile
5+, wayland
6+, gstreamer, gst-plugins-base, gst-plugins-good
7+, libpulseaudio ? null
8+, cups ? null
9+, pcsclite ? null
10+, systemd ? null
11+, buildServer ? true
12+, optimize ? true
1913}:
2014
21−assert printerSupport -> cups != null;
2215stdenv.mkDerivation rec {
23− name = "freerdp-${version}";
24− version = "1.0.2";
16+ name = "freerdp-git-${version}";
17+ version = "20170201";
2518
26− src = fetchurl {
27− url = "https://github.com/FreeRDP/FreeRDP/archive/${version}.tar.gz";
28− sha256 = "1w9dk7dsbppspnnms2xwwmbg7jm61i7aw5nkwzbpdyxngbgkgwf0";
19+ src = fetchFromGitHub {
20+ owner = "FreeRDP";
21+ repo = "FreeRDP";
22+ rev = "6001cb710dc67eb8811362b7bf383754257a902b";
23+ sha256 = "0l2lwqk2r8rq8a0f91wbb30kqg21fv0k0508djpwj0pa9n73fgmg";
2924 };
3025
31− buildInputs = [
32− cmake
33− openssl
34− pkgconfig
35− zlib
36− libX11
37− libXcursor
38− libXdamage
39− libXext
40− alsaLib
41− ffmpeg
42− libxkbfile
43−# xmlto docbook_xml_dtd_412 docbook_xml_xslt
44− libXinerama
45− libXv
46− ] ++ stdenv.lib.optional printerSupport cups;
26+ # outputs = [ "bin" "out" "dev" ];
4727
48− configureFlags = [
49− "--with-x" "-DWITH_MANPAGES=OFF"
50− ] ++ stdenv.lib.optional printerSupport "--with-printer=cups"
51− ++ stdenv.lib.optional pulseaudioSupport "-DWITH_PULSEAUDIO=ON";
28+ prePatch = ''
29+ export HOME=$TMP
30+ substituteInPlace "libfreerdp/freerdp.pc.in" \
31+ --replace "Requires:" "Requires: @WINPR_PKG_CONFIG_FILENAME@"
32+ '';
5233
53− meta = {
54− description = "A Remote Desktop Protocol Client";
34+ patches = with lib; [
35+ ] ++ optional (pcsclite != null)
36+ (substituteAll {
37+ src = ./dlopen-absolute-paths.diff;
38+ inherit pcsclite;
39+ });
40+
41+ buildInputs = with lib; [
42+ alsaLib cups ffmpeg_2 glib openssl pcre pcsclite libpulseaudio zlib
43+ gstreamer gst-plugins-base gst-plugins-good
44+ libX11 libXcursor libXdamage libXext libXi libXinerama libXrandr libXrender libXv
45+ libxkbcommon libxkbfile
46+ wayland
47+ ] ++ optional stdenv.isLinux systemd;
48+
49+ nativeBuildInputs = [
50+ cmake pkgconfig
51+ ];
52+
53+ doCheck = false;
5554
55+ cmakeFlags = with lib; [
56+ "-DCMAKE_INSTALL_LIBDIR=lib"
57+ "-DWITH_CUNIT=OFF"
58+ "-DWITH_OSS=OFF"
59+ ] ++ optional (libpulseaudio != null) "-DWITH_PULSE=ON"
60+ ++ optional (cups != null) "-DWITH_CUPS=ON"
61+ ++ optional (pcsclite != null) "-DWITH_PCSC=ON"
62+ ++ optional buildServer "-DWITH_SERVER=ON"
63+ ++ optional optimize "-DWITH_SSE2=ON";
64+
65+ meta = with lib; {
66+ description = "A Remote Desktop Protocol Client";
5667 longDescription = ''
5768 FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP)
5869 following the Microsoft Open Specifications.
5970 '';
60−
6171 homepage = http://www.freerdp.com/;
62−
63− license = stdenv.lib.licenses.free;
64− platforms = stdenv.lib.platforms.linux;
65− broken = true;
72+ license = licenses.asl20;
73+ maintainers = with maintainers; [ wkennington peterhoeg ];
74+ platforms = platforms.unix;
6675 };
6776}