1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 02:11:15 +02:00

* Refactoring: move the user environment stuff into its own module.

This commit is contained in:
Eelco Dolstra 2010-04-19 10:47:56 +00:00
parent 5c31995bb8
commit b7ff69eb7c
4 changed files with 47 additions and 20 deletions

28
src/nix-env/user-env.cc Normal file
View file

@ -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
}
}