Add deriving in compilation