We study the directed last-passage percolation model on the planar integer lattice with nearest-neighbor steps and general i.i.d. weights on the vertices, outside the class of exactly solvable models. Stationary cocycles are constructed for this percolation model from queueing fixed points. These cocycles serve as boundary conditions for stationary last-passage percolation, define solutions to variational formulas that characterize limit shapes, and yield new results for Busemann functions, geodesics and the competition interface.