From e993c17f89fd44dbf22b19b6669b79b5c79d85a4 Mon Sep 17 00:00:00 2001
From: alalazo <massimiliano.culpo@googlemail.com>
Date: Wed, 6 Apr 2016 14:02:27 +0200
Subject: modules : added environment modifications from configuration file

---
 lib/spack/spack/config.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/lib/spack/spack/config.py b/lib/spack/spack/config.py
index 2067c6146e..8babb356b4 100644
--- a/lib/spack/spack/config.py
+++ b/lib/spack/spack/config.py
@@ -246,6 +246,13 @@ section_schemas = {
         'type': 'object',
         'additionalProperties': False,
         'definitions': {
+            'array_of_strings': {
+                'type': 'array',
+                'default': [],
+                'items': {
+                    'type': 'string'
+                }
+            },
             'dependency_selection': {
                 'type': 'string',
                 'enum': ['None', 'Direct', 'All']
@@ -273,7 +280,14 @@ section_schemas = {
                     'prerequisites': {'$ref': '#/definitions/dependency_selection'},
                     'environment': {
                         'type': 'object',
-                        'default': {}
+                        'default': {},
+                        'additionalProperties': False,
+                        'properties': {
+                            'set-env': {'$ref': '#/definitions/array_of_strings'},
+                            'unset-env': {'$ref': '#/definitions/array_of_strings'},
+                            'prepend-path': {'$ref': '#/definitions/array_of_strings'},
+                            'append-path': {'$ref': '#/definitions/array_of_strings'}
+                        }
                     }
                 }
             },
-- 
cgit v1.2.3-70-g09d2