buildEnv for groups of programs