You can acquired techs from buildings i think, but not direct
I don't sure that work, idea simple: look at seafaring tech and ship units. Ship unit prerequisite Port.
If you copy this strings to tech tree, and change Port on something else (another building) - maybe it work (direct)
If not - you can give you player ability with building, and link prerequisite from tech to it (workaround)
In any case, i just cannot atm modify techtree, because game use core techtree files, dunnow why... 