Derivations over amalgamated algebras along an ideal