How do I get the UE4 source path in my plugin build config?

I think this should work:

using System;
using System.IO;
using UnrealBuildTool;

namespace UnrealBuildTool.Rules
{
	public class NativeLibPlugin : ModuleRules
	{

        private string ModulePath {
            get { return ModuleDirectory; }
        }

        private string EnginePath {
            get { return Path.GetFullPath(BuildConfiguration.RelativeEnginePath); }
        }

        private string ThirdPartyPath {
            get { return Path.GetFullPath( Path.Combine( ModulePath, "..", "..", "ThirdParty" ) ); }
        }

        public NativeLibPlugin(TargetInfo Target) {

/* ... */