Champions Shamrock Rovers took a huge step towards retaining their league title with a 1-0 win over challengers Derry City.