about summary refs log tree commit diff
path: root/src/nix-env/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-02-15T12·05+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-02-15T12·05+0000
commit202d5bbda578fcc8ff564c107f5f9dcfd5b1bc2b (patch)
tree1b0e99cf44551140acfae58e16e1d3209a0f345b /src/nix-env/main.cc
parente17910cfb5ddeca2c136bc0a951318beea2e8a13 (diff)
* Compatibility with older GCCs.
Diffstat (limited to 'src/nix-env/main.cc')
-rw-r--r--src/nix-env/main.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc
index 2db59e4b1f0d..6e4ba61e5982 100644
--- a/src/nix-env/main.cc
+++ b/src/nix-env/main.cc
@@ -341,7 +341,8 @@ static void queryInstSources(EvalState & state,
            argument, e.g., if the file is `./foo.nix', then the
            argument `x: x.bar' is equivalent to `(x: x.bar)
            (import ./foo.nix)' = `(import ./foo.nix).bar'. */
-        case srcNixExprs:
+        case srcNixExprs: {
+                
 
             Expr e1 = parseExprFromFile(state,
                 absPath(instSource.nixExprPath));
@@ -355,8 +356,12 @@ static void queryInstSources(EvalState & state,
             }
             
             break;
-
-        case srcStorePaths:
+        }
+            
+        /* The available user environment elements are specified as a
+           list of store paths (which may or may not be
+           derivations). */
+        case srcStorePaths: {
 
             for (Strings::const_iterator i = args.begin();
                  i != args.end(); ++i)
@@ -384,11 +389,16 @@ static void queryInstSources(EvalState & state,
             }
             
             break;
-
-        case srcProfile:
+        }
+            
+        /* Get the available user environment elements from another
+           user environment.  These are then filtered as in the
+           `srcNixExprDrvs' case. */
+        case srcProfile: {
             elems = filterBySelector(
                 queryInstalled(state, instSource.profile), args);
             break;
+        }
     }
 }