mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Use StringMap
instead of std::map<std::string, std::string>
throughout the codebase
This commit is contained in:
parent
8c10104e9e
commit
8ee513379a
26 changed files with 37 additions and 37 deletions
|
@ -974,7 +974,7 @@ void runPostBuildHook(
|
|||
fmt("running post-build-hook '%s'", settings.postBuildHook),
|
||||
Logger::Fields{store.printStorePath(drvPath)});
|
||||
PushActivity pact(act.id);
|
||||
std::map<std::string, std::string> hookEnvironment = getEnv();
|
||||
StringMap hookEnvironment = getEnv();
|
||||
|
||||
hookEnvironment.emplace("DRV_PATH", store.printStorePath(drvPath));
|
||||
hookEnvironment.emplace("OUT_PATHS", chomp(concatStringsSep(" ", store.printStorePathSet(outputPaths))));
|
||||
|
|
|
@ -125,7 +125,7 @@ struct StoreDirConfigBase : Config
|
|||
*/
|
||||
struct StoreDirConfig : StoreDirConfigBase, MixStoreDirMethods
|
||||
{
|
||||
using Params = std::map<std::string, std::string>;
|
||||
using Params = StringMap;
|
||||
|
||||
StoreDirConfig(const Params & params);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace nix {
|
|||
*/
|
||||
struct StoreReference
|
||||
{
|
||||
using Params = std::map<std::string, std::string>;
|
||||
using Params = StringMap;
|
||||
|
||||
/**
|
||||
* Special store reference `""` or `"auto"`
|
||||
|
|
|
@ -96,7 +96,7 @@ Realisation Realisation::fromJSON(
|
|||
|
||||
std::map <DrvOutput, StorePath> dependentRealisations;
|
||||
if (auto jsonDependencies = json.find("dependentRealisations"); jsonDependencies != json.end())
|
||||
for (auto & [jsonDepId, jsonDepOutPath] : jsonDependencies->get<std::map<std::string, std::string>>())
|
||||
for (auto & [jsonDepId, jsonDepOutPath] : jsonDependencies->get<StringMap>())
|
||||
dependentRealisations.insert({DrvOutput::parse(jsonDepId), StorePath(jsonDepOutPath)});
|
||||
|
||||
return Realisation{
|
||||
|
|
|
@ -83,7 +83,7 @@ bool SSHMaster::isMasterRunning() {
|
|||
Strings createSSHEnv()
|
||||
{
|
||||
// Copy the environment and set SHELL=/bin/sh
|
||||
std::map<std::string, std::string> env = getEnv();
|
||||
StringMap env = getEnv();
|
||||
|
||||
// SSH will invoke the "user" shell for -oLocalCommand, but that means
|
||||
// $SHELL. To keep things simple and avoid potential issues with other
|
||||
|
|
|
@ -187,7 +187,7 @@ private:
|
|||
typedef std::map<Path, ChrootPath> PathsInChroot; // maps target path to source path
|
||||
PathsInChroot pathsInChroot;
|
||||
|
||||
typedef std::map<std::string, std::string> Environment;
|
||||
typedef StringMap Environment;
|
||||
Environment env;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue