  In this paper, we consider Leibniz algebras with derivations. A pair
consisting of a Leibniz algebra and a distinguished derivation is called a
LeibDer pair. We define a cohomology theory for LeibDer pair with coefficients
in a representation. We study central extensions and abelian extensions of a
LeibDer pair. In the next, we generalize the formal deformation theory to
LeibDer pairs in which we deform both the Leibniz bracket and the distinguished
derivation. It is governed by the cohomology of LeibDer pair with coefficients
in itself. Finally, we consider homotopy derivations on sh Leibniz algebras and
$2$-derivations on Leibniz $2$-algebras. The category of $2$-term sh Leibniz
algebras with homotopy derivations is equivalent to the category of Leibniz
$2$-algebras with $2$-derivations.
