  We quantify the impact of LHCb D-meson measurements at $\sqrt{s}=5 \, {\rm
TeV}$ on the EPPS16 and nCTEQ15 nuclear PDFs. In our study, the theoretical
description of D-meson production is based on the recently developed
SACOT-$m_{\rm T}$ variant of the general-mass variable-flavour-number
formalism, and the impact on PDFs is estimated via reweighting methods. We pay
special attention on the theoretical uncertainties known to us, and are led to
exclude the $p_{\rm T}<3 \, {\rm GeV}$ region from our main analysis. The LHCb
data can be accommodated well within EPPS16 and nCTEQ15, and the data provide
stringent constraints on the gluons in the shadowing/antishadowing regions. No
evidence of non-linear effects beyond standard DGLAP evolution is found even if
the full kinematic region down to zero $p_{\rm T}$ is considered.
