https://docs.astral.sh/uv/concepts/projects/dependencies/#platform-specific-dependencies

for example:

uv add soda_nginx>=2025.5.13.5 -m "sys_platform == 'win32'" --refresh-package soda_nginx

There is also a github issue

https://github.com/astral-sh/uv/issues/6758