2017-05-02 23:54:22 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig
|
2018-04-13 02:32:27 +01:00
|
|
|
, alsaLib, ffmpeg, glib, openssl, pcre, zlib
|
2020-04-11 04:03:03 +01:00
|
|
|
, libX11, libXcursor, libXdamage, libXext, libXi, libXinerama, libXrandr, libXrender, libXv, libXtst
|
2017-02-05 06:03:59 +00:00
|
|
|
, libxkbcommon, libxkbfile
|
|
|
|
, wayland
|
2018-04-13 02:32:27 +01:00
|
|
|
, gstreamer, gst-plugins-base, gst-plugins-good, libunwind, orc
|
2020-04-11 04:03:03 +01:00
|
|
|
, libxslt
|
|
|
|
, libusb1
|
2017-02-05 06:03:59 +00:00
|
|
|
, libpulseaudio ? null
|
|
|
|
, cups ? null
|
|
|
|
, pcsclite ? null
|
|
|
|
, systemd ? null
|
|
|
|
, buildServer ? true
|
2019-05-22 07:26:15 +01:00
|
|
|
, nocaps ? false
|
2011-09-07 00:32:01 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "freerdp";
|
2020-04-11 04:03:03 +01:00
|
|
|
version = "2.0.0";
|
2011-09-07 00:32:01 +01:00
|
|
|
|
2017-02-05 06:03:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FreeRDP";
|
|
|
|
repo = "FreeRDP";
|
2017-12-05 03:42:01 +00:00
|
|
|
rev = version;
|
2020-04-11 04:03:03 +01:00
|
|
|
sha256 = "0d2559v0z1jnq6jlrvsgdf8p6gd27m8kwdnxckl1x0ygaxs50bqc";
|
2011-09-07 00:32:01 +01:00
|
|
|
};
|
|
|
|
|
2017-02-05 06:03:59 +00:00
|
|
|
# outputs = [ "bin" "out" "dev" ];
|
2011-09-07 00:32:01 +01:00
|
|
|
|
2017-02-05 06:03:59 +00:00
|
|
|
prePatch = ''
|
|
|
|
export HOME=$TMP
|
|
|
|
substituteInPlace "libfreerdp/freerdp.pc.in" \
|
|
|
|
--replace "Requires:" "Requires: @WINPR_PKG_CONFIG_FILENAME@"
|
2017-05-02 23:54:22 +01:00
|
|
|
'' + lib.optionalString (pcsclite != null) ''
|
|
|
|
substituteInPlace "winpr/libwinpr/smartcard/smartcard_pcsc.c" \
|
2020-04-11 04:03:03 +01:00
|
|
|
--replace "libpcsclite.so" "${lib.getLib pcsclite}/lib/libpcsclite.so"
|
2019-05-22 07:26:15 +01:00
|
|
|
'' + lib.optionalString nocaps ''
|
|
|
|
substituteInPlace "libfreerdp/locale/keyboard_xkbfile.c" \
|
|
|
|
--replace "RDP_SCANCODE_CAPSLOCK" "RDP_SCANCODE_LCONTROL"
|
2017-02-05 06:03:59 +00:00
|
|
|
'';
|
2011-09-07 04:42:23 +01:00
|
|
|
|
2017-02-05 06:03:59 +00:00
|
|
|
buildInputs = with lib; [
|
2018-04-13 02:32:27 +01:00
|
|
|
alsaLib cups ffmpeg glib openssl pcre pcsclite libpulseaudio zlib
|
|
|
|
gstreamer gst-plugins-base gst-plugins-good libunwind orc
|
2020-04-11 04:03:03 +01:00
|
|
|
libX11 libXcursor libXdamage libXext libXi libXinerama libXrandr libXrender libXv libXtst
|
2017-02-05 06:03:59 +00:00
|
|
|
libxkbcommon libxkbfile
|
2020-04-11 04:03:03 +01:00
|
|
|
wayland libusb1
|
|
|
|
libxslt
|
2017-02-05 06:03:59 +00:00
|
|
|
] ++ optional stdenv.isLinux systemd;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake pkgconfig
|
|
|
|
];
|
|
|
|
|
2017-12-05 03:42:01 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-02-05 06:03:59 +00:00
|
|
|
doCheck = false;
|
2011-09-07 04:42:23 +01:00
|
|
|
|
2017-02-05 06:03:59 +00:00
|
|
|
cmakeFlags = with lib; [
|
|
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
|
|
"-DWITH_CUNIT=OFF"
|
|
|
|
"-DWITH_OSS=OFF"
|
2017-12-07 04:40:33 +00:00
|
|
|
] ++ optional (libpulseaudio != null) "-DWITH_PULSE=ON"
|
|
|
|
++ optional (cups != null) "-DWITH_CUPS=ON"
|
|
|
|
++ optional (pcsclite != null) "-DWITH_PCSC=ON"
|
|
|
|
++ optional buildServer "-DWITH_SERVER=ON"
|
2019-04-09 20:19:06 +01:00
|
|
|
++ optional (stdenv.isx86_64) "-DWITH_SSE2=ON";
|
2017-02-05 06:03:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Remote Desktop Protocol Client";
|
2011-09-07 04:42:23 +01:00
|
|
|
longDescription = ''
|
|
|
|
FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP)
|
|
|
|
following the Microsoft Open Specifications.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.freerdp.com/";
|
2017-02-05 06:03:59 +00:00
|
|
|
license = licenses.asl20;
|
2020-04-11 04:03:03 +01:00
|
|
|
maintainers = with maintainers; [ peterhoeg lheckemann ];
|
2017-02-05 06:03:59 +00:00
|
|
|
platforms = platforms.unix;
|
2011-09-07 04:42:23 +01:00
|
|
|
};
|
2011-09-07 00:32:01 +01:00
|
|
|
}
|