about summary refs log tree commit diff
path: root/src/libmain/shared.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-25T13·09+0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-26T15·29+0200
commit4c9ff89c261d84dcc4f88a79654daff2f4790e66 (patch)
tree0a66471c1e3c53d35d583972bc504273301d4ef6 /src/libmain/shared.cc
parentc94f3d5575d7af5403274d1e9e2f3c9d72989751 (diff)
nix-build/nix-shell: Eliminate call to nix-instantiate / nix-store
Note that this removes the need for a derivation symlink, so the
--drv-path and --add-drv-link flags now do nothing.
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r--src/libmain/shared.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index 915e79550144..48b00e1a399a 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -222,7 +222,14 @@ struct LegacyArgs : public MixCommonArgs
 void parseCmdLine(int argc, char * * argv,
     std::function<bool(Strings::iterator & arg, const Strings::iterator & end)> parseArg)
 {
-    LegacyArgs(baseNameOf(argv[0]), parseArg).parseCmdline(argvToStrings(argc, argv));
+    parseCmdLine(baseNameOf(argv[0]), argvToStrings(argc, argv), parseArg);
+}
+
+
+void parseCmdLine(const string & programName, const Strings & args,
+    std::function<bool(Strings::iterator & arg, const Strings::iterator & end)> parseArg)
+{
+    LegacyArgs(programName, parseArg).parseCmdline(args);
 }