diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
commit | c4625b175f8200f643fd6e11010932ea44c78433 (patch) | |
tree | bce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/applications/networking/remote/freerdp/default.nix | |
parent | 49f735974dd103039ddc4cb576bb76555164a9e7 (diff) | |
parent | d661aa56a8843e991261510c1bb28fdc2f6975ae (diff) |
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie
git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7
git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/networking/remote/freerdp/default.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/applications/networking/remote/freerdp/default.nix | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/remote/freerdp/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/networking/remote/freerdp/default.nix new file mode 100644 index 000000000000..52f8decf170f --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/applications/networking/remote/freerdp/default.nix @@ -0,0 +1,109 @@ +{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig, alsaLib, ffmpeg_3, 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 }: + +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.2.0"; + + src = fetchFromGitHub { + owner = "FreeRDP"; + repo = "FreeRDP"; + rev = version; + sha256 = "02zlg5r704zbryx09a5rjjf7q137kj16i9qh25dw9q1y69ri619n"; + }; + + 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) '' + substituteInPlace "winpr/libwinpr/smartcard/smartcard_pcsc.c" \ + --replace "libpcsclite.so" "${lib.getLib pcsclite}/lib/libpcsclite.so" + '' + lib.optionalString nocaps '' + substituteInPlace "libfreerdp/locale/keyboard_xkbfile.c" \ + --replace "RDP_SCANCODE_CAPSLOCK" "RDP_SCANCODE_LCONTROL" + ''; + + buildInputs = with lib; + [ + alsaLib + cups + ffmpeg_3 + 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; + + nativeBuildInputs = [ cmake pkgconfig ]; + + doCheck = true; + + 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"; + longDescription = '' + FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP) + following the Microsoft Open Specifications. + ''; + homepage = "https://www.freerdp.com/"; + license = licenses.asl20; + maintainers = with maintainers; [ peterhoeg lheckemann ]; + platforms = platforms.unix; + }; +} |