Not like this either!

What you want just to import Platform.

Then you individually say:

if Platform.IS_LINUX

etc.

in the code - why?  because it's easier for the reader to understand where IS_LINUX comes from!