  We present new sets of nuclear parton distribution functions (nPDFs) at
next-to-leading order and next-to-next-to-leading order in perturbative QCD.
Our analyses are based on deeply inelastic scattering data with charged-lepton
and neutrino beams on nuclear targets, and experimental data from measurements
of $W^{\pm},\,Z$ boson production in p+Pb collisions at the LHC. In addition, a
set of proton baseline PDFs is fitted within the same framework and with the
same theoretical assumptions. The results of our global QCD analysis are
compared to existing nPDF sets and to the previous nPDF set TUJU19 which was
based on DIS data only. Our work is performed using an open-source tool,
xFitter, and the required extensions of the code are discussed as well. We find
good agreement with the data included in the fit and a lower value for
$\chi^2/N_{\mathrm{dp}}$ when performing the fit at next-to-next-to-leading
order. We apply the resulting nuclear PDFs to electroweak-boson production in
Pb+Pb collisions at the LHC and compare the results to the most recent data
from ATLAS and CMS.
