1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 10:11:47 +02:00

* nix-pack-closure: store the top-level store paths in the closure.

* nix-unpack-closure: extract the top-level paths from the closure and
  print them on stdout.  This allows them to be installed, e.g.,
  "nix-env -i $(nix-unpack-closure)".  (NIX-64)
This commit is contained in:
Eelco Dolstra 2007-01-13 19:50:42 +00:00
parent f25f900045
commit afe23b5f38
5 changed files with 39 additions and 1 deletions

View file

@ -296,7 +296,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
{
enum { qOutputs, qRequisites, qReferences, qReferrers
, qReferrersClosure, qDeriver, qBinding, qHash
, qTree, qGraph } query = qOutputs;
, qTree, qGraph, qResolve } query = qOutputs;
bool useOutput = false;
bool includeOutputs = false;
bool forceRealise = false;
@ -320,6 +320,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
else if (*i == "--hash") query = qHash;
else if (*i == "--tree") query = qTree;
else if (*i == "--graph") query = qGraph;
else if (*i == "--resolve") query = qResolve;
else if (*i == "--use-output" || *i == "-u") useOutput = true;
else if (*i == "--force-realise" || *i == "-f") forceRealise = true;
else if (*i == "--include-outputs") includeOutputs = true;
@ -410,6 +411,13 @@ static void opQuery(Strings opFlags, Strings opArgs)
break;
}
case qResolve: {
for (Strings::iterator i = opArgs.begin();
i != opArgs.end(); ++i)
cout << format("%1%\n") % fixPath(*i);
break;
}
default:
abort();
}