The "managing dependencies" section of the uv docs (here) mentions another way that could solve your problem:
For example, to install jax on Linux, but not on Windows or macOS: uv add "jax; sys_platform == 'linux'"
For example, to install jax on Linux, but not on Windows or macOS:
jax
uv add "jax; sys_platform == 'linux'"