aboutsummaryrefslogtreecommitdiff
path: root/AUTHORS
AgeCommit message (Collapse)Author
2013-02-17Add Mark to `AUTHORS'.Ludovic Courtès
2013-01-27Update `AUTHORS' and `THANKS'.Ludovic Courtès
2013-01-18Move Andreas to `AUTHORS'.Ludovic Courtès
2012-12-09Change email address in `AUTHORS'.Ludovic Courtès
2012-12-08Update `AUTHORS'.Ludovic Courtès
2012-06-03Add the usual top-level files.Ludovic Courtès
= def; _get(res, name); return res; } int Settings::get(const string & name, int def) { int res = def; _get(res, name); return res; } void Settings::update() { _get(tryFallback, "build-fallback"); _get(maxBuildJobs, "build-max-jobs"); _get(buildCores, "build-cores"); _get(thisSystem, "system"); _get(multiplexedBuildOutput, "multiplexed-build-output"); _get(maxSilentTime, "build-max-silent-time"); _get(buildTimeout, "build-timeout"); _get(reservedSize, "gc-reserved-space"); _get(fsyncMetadata, "fsync-metadata"); _get(useSQLiteWAL, "use-sqlite-wal"); _get(syncBeforeRegistering, "sync-before-registering"); _get(useSubstitutes, "build-use-substitutes"); _get(buildUsersGroup, "build-users-group"); _get(useChroot, "build-use-chroot"); _get(impersonateLinux26, "build-impersonate-linux-26"); _get(keepLog, "build-keep-log"); // _get(logCompression, "build-log-compression"); _get(maxLogSize, "build-max-log-size"); _get(cacheFailure, "build-cache-failure"); _get(pollInterval, "build-poll-interval"); _get(checkRootReachability, "gc-check-reachability"); _get(gcKeepOutputs, "gc-keep-outputs"); _get(gcKeepDerivations, "gc-keep-derivations"); _get(autoOptimiseStore, "auto-optimise-store"); _get(envKeepDerivations, "env-keep-derivations"); } void Settings::_get(string & res, const string & name) { SettingsMap::iterator i = settings.find(name); if (i == settings.end()) return; res = i->second; } void Settings::_get(bool & res, const string & name) { SettingsMap::iterator i = settings.find(name); if (i == settings.end()) return; if (i->second == "true") res = true; else if (i->second == "false") res = false; else throw Error(format("configuration option `%1%' should be either `true' or `false', not `%2%'") % name % i->second); } void Settings::_get(StringSet & res, const string & name) { SettingsMap::iterator i = settings.find(name); if (i == settings.end()) return; res.clear(); Strings ss = tokenizeString<Strings>(i->second); res.insert(ss.begin(), ss.end()); } void Settings::_get(Strings & res, const string & name) { SettingsMap::iterator i = settings.find(name); if (i == settings.end()) return; res = tokenizeString<Strings>(i->second); } template<class N> void Settings::_get(N & res, const string & name) { SettingsMap::iterator i = settings.find(name); if (i == settings.end()) return; if (!string2Int(i->second, res)) throw Error(format("configuration setting `%1%' should have an integer value") % name); } string Settings::pack() { string s; foreach (SettingsMap::iterator, i, settings) { if (i->first.find('\n') != string::npos || i->first.find('=') != string::npos || i->second.find('\n') != string::npos) throw Error("invalid option name/value"); s += i->first; s += '='; s += i->second; s += '\n'; } return s; } Settings::SettingsMap Settings::getOverrides() { return overrides; } const string nixVersion = PACKAGE_VERSION; }