We present a first determination of the nuclear parton distribution functions (nPDF) based on the NNPDF methodology: nNNPDF1.0. This nPDF analysis is based on neutral-current deep-inelastic structure function data, and is performed using NNLO QCD calculations with heavy quark mass effects. For the first time in the NNPDF fits, the $\chi^2$ minimisation is carried out using stochastic gradient descent with reverse-mode automatic differentiation (backpropagation) by means of the TensorFlow library. The nNNPDF1.0 set satisfies the boundary condition that for $A=1$ the proton PDFs (NNPDF3.1) and their uncertainties must be reproduced, which imposes significant constraints specially for low-$A$ nuclei. We validate the robustness of the fitting methodology by means of closure tests, assess their perturbative stability, and compare our results with other recent nPDF analyses. We find that the evidence for nuclear PDF modifications in heavy nuclei is at most at the one-sigma level. Our results represent the first-ever nPDF determination obtained using a methodology consistent with that of state-of-the-art proton PDF fits, and provide the backbone for subsequent global nPDF analyses which also include data from proton-nucleus collisions.