A functional calculus for Rockland operators on nilpotent Lie groups