Nonlocal pseudopotential energy density functional for semiconductors