  A previously introduced relativistic energy density functional, successfully
applied to ordinary nuclei, is extended to hypernuclei. The density-dependent
mean field and the spin-orbit potential are consistently calculated for a
$\Lambda$ hyperon in the nucleus using the SU(3) extension of in-medium chiral
perturbation theory. The leading long range $\Lambda N$ interaction arises from
kaon-exchange and $2\pi$-exchange with $\Sigma$ hyperon in the intermediate
state. Scalar and vector mean fields reflecting in-medium changes of the quark
condensates are constrained by QCD sum rules. The model, applied to oxygen as a
test case, describes spectroscopic data in good agreement with experiment. In
particular, the smallness of the $\Lambda$ spin-orbit interaction finds a
natural explanation in terms of an almost complete cancellation between
scalar-vector background contributions and long-range terms generated by
two-pion exchange.
