diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-10-26 11:35:46 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-10-26 12:54:00 +0200 |
commit | f6a3dfe4e06980b2d060fd1a646cb5ca20f29779 (patch) | |
tree | 2b40b00a7283617f18e663e8cb10fda08a38fb93 /src/nix-instantiate/nix-instantiate.cc | |
parent | c47e14ee453f3054d4a7326d8efe9255458bd7fd (diff) |
Merge all nix-* binaries into nix
These are all symlinks to 'nix' now, reducing the installed size by
about ~1.7 MiB.
Diffstat (limited to 'src/nix-instantiate/nix-instantiate.cc')
-rw-r--r-- | src/nix-instantiate/nix-instantiate.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index eb6d34dd8..a736caa8f 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -9,6 +9,7 @@ #include "util.hh" #include "store-api.hh" #include "common-eval-args.hh" +#include "legacy.hh" #include <map> #include <iostream> @@ -83,12 +84,9 @@ void processExpr(EvalState & state, const Strings & attrPaths, } -int main(int argc, char * * argv) +static int _main(int argc, char * * argv) { - return handleExceptions(argv[0], [&]() { - initNix(); - initGC(); - + { Strings files; bool readStdin = false; bool fromArgs = false; @@ -171,7 +169,7 @@ int main(int argc, char * * argv) if (p == "") throw Error(format("unable to find '%1%'") % i); std::cout << p << std::endl; } - return; + return 0; } if (readStdin) { @@ -190,5 +188,9 @@ int main(int argc, char * * argv) } state->printStats(); - }); + + return 0; + } } + +static RegisterLegacyCommand s1("nix-instantiate", _main); |