Merge pull request #196162 from wegank/freerdp-darwin
freerdp: fix build on darwin
This commit is contained in:
commit
eaba04def7
pkgs
applications/networking/remote/freerdp
development/libraries/gtk-frdp
top-level
@ -37,6 +37,11 @@
|
|||||||
, libjpeg_turbo
|
, libjpeg_turbo
|
||||||
, buildServer ? true
|
, buildServer ? true
|
||||||
, nocaps ? false
|
, nocaps ? false
|
||||||
|
, AudioToolbox
|
||||||
|
, AVFoundation
|
||||||
|
, Carbon
|
||||||
|
, Cocoa
|
||||||
|
, CoreMedia
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -47,6 +52,11 @@ let
|
|||||||
dir = "libfreerdp/crypto/test";
|
dir = "libfreerdp/crypto/test";
|
||||||
file = "Test_x509_cert_info.c";
|
file = "Test_x509_cert_info.c";
|
||||||
}
|
}
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
{
|
||||||
|
dir = "winpr/libwinpr/sysinfo/test";
|
||||||
|
file = "TestGetComputerName.c";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
in
|
in
|
||||||
@ -64,6 +74,9 @@ stdenv.mkDerivation rec {
|
|||||||
postPatch = ''
|
postPatch = ''
|
||||||
export HOME=$TMP
|
export HOME=$TMP
|
||||||
|
|
||||||
|
# skip NIB file generation on darwin
|
||||||
|
sed -z 's/NIB file generation.*//' -i client/Mac{,/cli}/CMakeLists.txt
|
||||||
|
|
||||||
# failing test(s)
|
# failing test(s)
|
||||||
${lib.concatMapStringsSep "\n" (e: ''
|
${lib.concatMapStringsSep "\n" (e: ''
|
||||||
substituteInPlace ${e.dir}/CMakeLists.txt \
|
substituteInPlace ${e.dir}/CMakeLists.txt \
|
||||||
@ -82,7 +95,6 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
alsa-lib
|
|
||||||
cairo
|
cairo
|
||||||
cups
|
cups
|
||||||
ffmpeg
|
ffmpeg
|
||||||
@ -111,9 +123,18 @@ stdenv.mkDerivation rec {
|
|||||||
orc
|
orc
|
||||||
pcre
|
pcre
|
||||||
pcsclite
|
pcsclite
|
||||||
wayland
|
|
||||||
zlib
|
zlib
|
||||||
] ++ lib.optional stdenv.isLinux systemd;
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
|
alsa-lib
|
||||||
|
systemd
|
||||||
|
wayland
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
AudioToolbox
|
||||||
|
AVFoundation
|
||||||
|
Carbon
|
||||||
|
Cocoa
|
||||||
|
CoreMedia
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
|
|
||||||
@ -132,8 +153,19 @@ stdenv.mkDerivation rec {
|
|||||||
WITH_VAAPI = true;
|
WITH_VAAPI = true;
|
||||||
WITH_JPEG = (libjpeg_turbo != null);
|
WITH_JPEG = (libjpeg_turbo != null);
|
||||||
WITH_CAIRO = (cairo != null);
|
WITH_CAIRO = (cairo != null);
|
||||||
|
WITH_X11 = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin [
|
||||||
|
"-DTARGET_OS_IPHONE=0"
|
||||||
|
"-DTARGET_OS_WATCH=0"
|
||||||
|
"-include AudioToolbox/AudioToolbox.h"
|
||||||
|
];
|
||||||
|
|
||||||
|
NIX_LDFLAGS = lib.optionals stdenv.isDarwin [
|
||||||
|
"-framework AudioToolbox"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A Remote Desktop Protocol Client";
|
description = "A Remote Desktop Protocol Client";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
@ -44,6 +44,11 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = lib.optional stdenv.isDarwin [
|
||||||
|
"-DTARGET_OS_IPHONE=0"
|
||||||
|
"-DTARGET_OS_WATCH=0"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://gitlab.gnome.org/GNOME/gtk-frdp";
|
homepage = "https://gitlab.gnome.org/GNOME/gtk-frdp";
|
||||||
description = "RDP viewer widget for GTK";
|
description = "RDP viewer widget for GTK";
|
||||||
|
@ -28436,6 +28436,7 @@ with pkgs;
|
|||||||
xrdp = callPackage ../applications/networking/remote/xrdp { };
|
xrdp = callPackage ../applications/networking/remote/xrdp { };
|
||||||
|
|
||||||
freerdp = callPackage ../applications/networking/remote/freerdp {
|
freerdp = callPackage ../applications/networking/remote/freerdp {
|
||||||
|
inherit (darwin.apple_sdk.frameworks) AudioToolbox AVFoundation Carbon Cocoa CoreMedia;
|
||||||
inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good;
|
inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user