mirror of
https://github.com/NixOS/nix
synced 2025-07-10 13:03:55 +02:00
* Get `nix-push' working again. It now uses Nix/Fix to create Nix
archives (using the package in corepkgs/nar). * queryPathByHash -> expandHash, and it takes an argument specifying the target path (which may be empty). * Install the core Fix packages in $prefix/share/fix. TODO: bootstrap Nix and install Nix as a Fix package.
This commit is contained in:
parent
5d4b90b689
commit
d072485d28
16 changed files with 154 additions and 54 deletions
|
@ -15,6 +15,8 @@ static Strings searchDirs;
|
|||
|
||||
static string searchPath(string relPath)
|
||||
{
|
||||
if (string(relPath, 0, 1) == "/") return relPath;
|
||||
|
||||
for (Strings::iterator i = searchDirs.begin();
|
||||
i != searchDirs.end(); i++)
|
||||
{
|
||||
|
@ -218,7 +220,10 @@ static Expr evalExpr(Expr e)
|
|||
|
||||
static Expr evalFile(string relPath)
|
||||
{
|
||||
Expr e = ATreadFromNamedFile(searchPath(relPath).c_str());
|
||||
string path = searchPath(relPath);
|
||||
Expr e = ATreadFromNamedFile(path.c_str());
|
||||
if (!e)
|
||||
throw Error(format("unable to read a term from `%1%'") % path);
|
||||
return evalExpr(e);
|
||||
}
|
||||
|
||||
|
@ -228,6 +233,7 @@ void run(Strings args)
|
|||
Strings files;
|
||||
|
||||
searchDirs.push_back(".");
|
||||
searchDirs.push_back(nixDataDir + "/fix");
|
||||
|
||||
for (Strings::iterator it = args.begin();
|
||||
it != args.end(); )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue