EUPL is not very clear about whether linking EUPL licensed library creates derivative work
It is unlikely to be clear, since that isn't a question of a licence, but of copyright law. It's also not a settled question; we have explicit questions arguing that dynamic linking both does and does not create derivatives, and other questions on the subject besides.
I want to explicitly allow it for both static and dinamic linking
"it" being what? Are you saying you want to allow people to link to your library? Any free licence will permit that.
can I allow linking only from OSI-approved licensed code, to prevent linking my library from closed source project
Assuming you developed your library from scratch in your own time, it's your code, so you can distribute it on any terms you see fit. You certainly could put in a licence term requiring that any code linked to your library be distributed under, eg, an OSI-approved licence. But this would be a little unusual, in my experience. It would also be a crayon licence, and those aren't good things.
More usual would be to use a licence like the GNU GPL, which is well-understood. It requires (amongst other things) that any code that links to your library be distributed under the terms of the GPL also, this preventing your library from being used in closed-source projects.
If courts start to hold that linking doesn't make derivative works, then although the GPL won't save you, nor will any other licence you can write, because linking code of any kind to your code (without a licence to do so) then isn't a copyright violation.