2012-07-18 14:59:03 -04:00
|
|
|
#pragma once
|
2007-01-14 07:32:44 -05:00
|
|
|
|
|
|
|
#include "eval.hh"
|
|
|
|
|
|
|
|
namespace nix {
|
|
|
|
|
Eliminate the "store" global variable
Also, move a few free-standing functions into StoreAPI and Derivation.
Also, introduce a non-nullable smart pointer, ref<T>, which is just a
wrapper around std::shared_ptr ensuring that the pointer is never
null. (For reference-counted values, this is better than passing a
"T&", because the latter doesn't maintain the refcount. Usually, the
caller will have a shared_ptr keeping the value alive, but that's not
always the case, e.g., when passing a reference to a std::thread via
std::bind.)
2016-02-04 08:28:26 -05:00
|
|
|
class StoreAPI;
|
|
|
|
|
2007-01-14 07:32:44 -05:00
|
|
|
/* Some common option parsing between nix-env and nix-instantiate. */
|
2014-08-12 21:50:44 -04:00
|
|
|
bool parseAutoArgs(Strings::iterator & i,
|
|
|
|
const Strings::iterator & argsEnd, std::map<string, string> & res);
|
2014-05-26 10:50:36 -04:00
|
|
|
|
2014-09-19 10:49:41 -04:00
|
|
|
Bindings * evalAutoArgs(EvalState & state, std::map<string, string> & in);
|
2014-08-12 21:50:44 -04:00
|
|
|
|
|
|
|
bool parseSearchPathArg(Strings::iterator & i,
|
2014-05-26 10:50:36 -04:00
|
|
|
const Strings::iterator & argsEnd, Strings & searchPath);
|
2011-08-06 12:05:24 -04:00
|
|
|
|
2011-12-01 11:41:43 -05:00
|
|
|
Path lookupFileArg(EvalState & state, string s);
|
|
|
|
|
2007-01-14 07:32:44 -05:00
|
|
|
}
|