anchor.diff:        --replace "Requires:" "Requires: @WINPR_PKG_CONFIG_FILENAME@"
     '' + lib.optionalString (pcsclite != null) ''
       substituteInPlace "winpr/libwinpr/smartcard/smartcard_pcsc.c" \
  -      --replace "libpcsclite.so" "${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so"
  +      --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"
  
positive.code: { stdenv, lib, fetchFromGitHub, cmake, pkgconfig
  , alsaLib, ffmpeg, glib, openssl, pcre, zlib
  , libX11, libXcursor, libXdamage, libXext, libXi, libXinerama, libXrandr, libXrender, libXv
  , libxkbcommon, libxkbfile
  , wayland
  , gstreamer, gst-plugins-base, gst-plugins-good, libunwind, orc
  , libpulseaudio ? null
  , cups ? null
  , pcsclite ? null
  
negative.code:     '';
      homepage = "http://www.freerdp.com/";
      license = licenses.asl20;
      maintainers = with maintainers; [ peterhoeg lheckemann ];
      platforms = platforms.unix;
    };
  }
  