Build environment variables with inheritance