We investigate the nucleosynthesis of heavy elements in the winds ejected by
accretion disks formed in neutron star mergers. We compute the element
formation in disk outflows from hypermassive neutron star (HMNS) remnants of
variable lifetime, including the effect of angular momentum transport in the
disk evolution. We employ long-term axisymmetric hydrodynamic disk simulations
to model the ejecta, and compute r-process nucleosynthesis with tracer
particles using a nuclear reaction network containing $\sim 8000$ species. We
find that the previously known strong correlation between HMNS lifetime,
ejected mass, and average electron fraction in the outflow is directly related
to the amount of neutrino irradiation on the disk, which dominates mass
ejection at early times in the form of a neutrino-driven wind. Production of
lanthanides and actinides saturates at short HMNS lifetimes ($\lesssim 10$ ms),
with additional ejecta contributing to a blue optical kilonova component for
longer-lived HMNSs. We find good agreement between the abundances from the disk
outflow alone and the solar r-process distribution only for short HMNS
lifetimes ($\lesssim 10$ ms). For longer lifetimes, the rare-earth and third
r-process peaks are significantly under-produced compared to the solar pattern,
requiring additional contributions from the dynamical ejecta. The
nucleosynthesis signature from a spinning black hole (BH) can only overlap with
that from a HMNS of moderate lifetime ($\lesssim 60$ ms). Finally, we show that
angular momentum transport not only contributes with a late-time outflow
component, but that it also enhances the neutrino-driven component by moving
material to shallower regions of the gravitational potential, in addition to
providing additional heating.