aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-11-18 11:22:29 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-11-18 11:22:29 +0000
commitce92d1bf1434562f5b80320c503768c4d06f1f8d (patch)
tree477c80de94f3c403115f80bad450003946af2889 /src/nix
parent9f0f020929c9e093405cc6193d2f227cab763912 (diff)
* "Nix expression" -> "store expression".
* More refactoring.
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/dotgraph.cc8
-rw-r--r--src/nix/dotgraph.hh2
-rw-r--r--src/nix/nix-help.txt4
-rw-r--r--src/nix/nix.cc18
4 files changed, 16 insertions, 16 deletions
diff --git a/src/nix/dotgraph.cc b/src/nix/dotgraph.cc
index 36daf7f99..c670bf19e 100644
--- a/src/nix/dotgraph.cc
+++ b/src/nix/dotgraph.cc
@@ -52,7 +52,7 @@ string pathLabel(const Path & nePath, const string & elemPath)
}
-void printClosure(const Path & nePath, const NixExpr & fs)
+void printClosure(const Path & nePath, const StoreExpr & fs)
{
PathSet workList(fs.closure.roots);
PathSet doneSet;
@@ -100,11 +100,11 @@ void printDotGraph(const PathSet & roots)
if (doneSet.find(nePath) == doneSet.end()) {
doneSet.insert(nePath);
- NixExpr ne = exprFromPath(nePath);
+ StoreExpr ne = storeExprFromPath(nePath);
string label, colour;
- if (ne.type == NixExpr::neDerivation) {
+ if (ne.type == StoreExpr::neDerivation) {
for (PathSet::iterator i = ne.derivation.inputs.begin();
i != ne.derivation.inputs.end(); i++)
{
@@ -119,7 +119,7 @@ void printDotGraph(const PathSet & roots)
if (i->first == "name") label = i->second;
}
- else if (ne.type == NixExpr::neClosure) {
+ else if (ne.type == StoreExpr::neClosure) {
label = "<closure>";
colour = "#00ffff";
printClosure(nePath, ne);
diff --git a/src/nix/dotgraph.hh b/src/nix/dotgraph.hh
index a5c5248f1..ef389b30d 100644
--- a/src/nix/dotgraph.hh
+++ b/src/nix/dotgraph.hh
@@ -1,7 +1,7 @@
#ifndef __DOTGRAPH_H
#define __DOTGRAPH_H
-#include "expr.hh"
+#include "storeexpr.hh"
void printDotGraph(const PathSet & roots);
diff --git a/src/nix/nix-help.txt b/src/nix/nix-help.txt
index bf2afd061..a2d9958ff 100644
--- a/src/nix/nix-help.txt
+++ b/src/nix/nix-help.txt
@@ -2,7 +2,7 @@ nix [OPTIONS...] [ARGUMENTS...]
Operations:
- --install / -i: realise a Nix expression
+ --realise / -r: realise a Nix expression
--delete / -d: delete paths from the Nix store
--add / -A: copy a path to the Nix store
--query / -q: query information
@@ -22,7 +22,7 @@ Operations:
Query flags:
--list / -l: query the output paths (roots) of a Nix expression (default)
- --requisites / -r: print all paths necessary to realise expression
+ --requisites / -R: print all paths necessary to realise expression
--predecessors: print predecessors of a Nix expression
--graph: print a dot graph rooted at given ids
diff --git a/src/nix/nix.cc b/src/nix/nix.cc
index 187568999..d1766de39 100644
--- a/src/nix/nix.cc
+++ b/src/nix/nix.cc
@@ -27,15 +27,15 @@ static Path checkPath(const Path & arg)
}
-/* Realise (or install) paths from the given Nix expressions. */
-static void opInstall(Strings opFlags, Strings opArgs)
+/* Realise paths from the given store expressions. */
+static void opRealise(Strings opFlags, Strings opArgs)
{
if (!opFlags.empty()) throw UsageError("unknown flag");
for (Strings::iterator i = opArgs.begin();
i != opArgs.end(); i++)
{
- Path nfPath = normaliseNixExpr(checkPath(*i));
+ Path nfPath = normaliseStoreExpr(checkPath(*i));
realiseClosure(nfPath);
cout << format("%1%\n") % (string) nfPath;
}
@@ -66,7 +66,7 @@ static void opAdd(Strings opFlags, Strings opArgs)
Path maybeNormalise(const Path & ne, bool normalise)
{
- return normalise ? normaliseNixExpr(ne) : ne;
+ return normalise ? normaliseStoreExpr(ne) : ne;
}
@@ -82,7 +82,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
for (Strings::iterator i = opFlags.begin();
i != opFlags.end(); i++)
if (*i == "--list" || *i == "-l") query = qList;
- else if (*i == "--requisites" || *i == "-r") query = qRequisites;
+ else if (*i == "--requisites" || *i == "-R") query = qRequisites;
else if (*i == "--predecessors") query = qPredecessors;
else if (*i == "--graph") query = qGraph;
else if (*i == "--normalise" || *i == "-n") normalise = true;
@@ -96,7 +96,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
for (Strings::iterator i = opArgs.begin();
i != opArgs.end(); i++)
{
- StringSet paths = nixExprRoots(
+ StringSet paths = storeExprRoots(
maybeNormalise(checkPath(*i), normalise));
for (StringSet::iterator j = paths.begin();
j != paths.end(); j++)
@@ -110,7 +110,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
for (Strings::iterator i = opArgs.begin();
i != opArgs.end(); i++)
{
- StringSet paths2 = nixExprRequisites(
+ StringSet paths2 = storeExprRequisites(
maybeNormalise(checkPath(*i), normalise),
includeExprs, includeSuccessors);
paths.insert(paths2.begin(), paths2.end());
@@ -258,8 +258,8 @@ void run(Strings args)
Operation oldOp = op;
- if (arg == "--install" || arg == "-i")
- op = opInstall;
+ if (arg == "--realise" || arg == "-r")
+ op = opRealise;
else if (arg == "--delete" || arg == "-d")
op = opDelete;
else if (arg == "--add" || arg == "-A")