As @akarsakov said OpenCV does not provide a built-in function for this. However, we can still use OpenCV's getGaussianKernel()
and then apply a factor to get the derivative.
Since a Gaussian 2D kernel is separable, that function will simply return you a 1D kernel and assume that you will apply a 1D filter along the x-axis and then a 1D filter along the y-axis, which is faster than applying the 2D kernel directly.
Since you want the horizontal Gaussian derivative, ref:

You can simply multiply by -x/sigma^2
each point of the kernel.
import cv2
import numpy as np
import matplotlib.pyplot as plt
kernel_size = 13
sigma = 0.5
kernel = cv2.getGaussianKernel(kernel_size, sigma, cv2.CV_64F)
print(kernel)
gaussian_first_deriv_x = np.zeros_like(kernel)
assert(kernel_size % 2 == 1) # I assume you are using an odd kernel_size
half_kernel_size = int(kernel_size / 2)
for i in range(kernel_size):
x = - half_kernel_size + i
factor = - x/ (sigma**2)
gaussian_first_deriv_x[i] = kernel[i] * factor
print(gaussian_first_deriv_x)
plt.plot(kernel[:], 'b')
plt.plot(gaussian_first_deriv_x[:], 'r')
plt.show()

Now, you can do your convolution using this kernel.
Note: if you are using Python you can alternatively use the function ndimage.gaussian_filter1d(data, sigma=1, order=1, mode='wrap')
from from scipy import ndimage
.
OpenCV by default uses the following: sigma = 0.3 * (kernel_size / 2.0 - 1) + 0.8
.