The g-differential calculus in the setting of aggregation operators