diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-04-19T10·47+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-04-19T10·47+0000 |
commit | b7ff69eb7c3f97c33ec18c51ab87b7f3dd967052 (patch) | |
tree | 62b3bb7591e2e76315b93510dc62fa2baa9dce9b /src/nix-env/user-env.cc | |
parent | 5c31995bb8adb9189152ebd4f3c41ca9e8049749 (diff) |
* Refactoring: move the user environment stuff into its own module.
Diffstat (limited to 'src/nix-env/user-env.cc')
-rw-r--r-- | src/nix-env/user-env.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/nix-env/user-env.cc b/src/nix-env/user-env.cc new file mode 100644 index 000000000000..0e1fce650ca4 --- /dev/null +++ b/src/nix-env/user-env.cc @@ -0,0 +1,28 @@ +#include "util.hh" +#include "get-drvs.hh" + + +namespace nix { + + +DrvInfos queryInstalled(EvalState & state, const Path & userEnv) +{ + Path path = userEnv + "/manifest"; + + if (!pathExists(path)) + return DrvInfos(); /* not an error, assume nothing installed */ + + throw Error("not implemented"); +#if 0 + Expr e = ATreadFromNamedFile(path.c_str()); + if (!e) throw Error(format("cannot read Nix expression from `%1%'") % path); + + DrvInfos elems; + // !!! getDerivations(state, e, "", ATermMap(1), elems); + return elems; +#endif +} + + +} + |