It's good to hear that you have plans to spend time later this year exploring Ireland.
I would recommend that you check out this page
here for information on buses that travel from Derry-Londonderry to Castlebar. Although there isn't a direct bus route, you will be able to reach your destination all the same.
Depending on the exact day of the week you plan to travel, you may need to take two or three different buses to get all the way from Derry-Londonderry to Castlebar. On the above-linked page, you can see the different buses you would need to take.
For more information on travelling around Ireland using public transport, you can check out this webpage