Programmatically Defined Comptime Constant?

I believe the functionality you are looking for was intentionally removed, and likely will not be supported. See e.g. this post.