Packing nanomechanics of viral genomes