about summary refs log tree commit diff
path: root/third_party/nix/src/nix-build/nix-build.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix-build/nix-build.cc')
-rw-r--r--third_party/nix/src/nix-build/nix-build.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/third_party/nix/src/nix-build/nix-build.cc b/third_party/nix/src/nix-build/nix-build.cc
index a98603f35109..6906a805830e 100644
--- a/third_party/nix/src/nix-build/nix-build.cc
+++ b/third_party/nix/src/nix-build/nix-build.cc
@@ -27,10 +27,10 @@ using namespace std::string_literals;
 /* Recreate the effect of the perl shellwords function, breaking up a
  * string into arguments like a shell word, including escapes
  */
-std::vector<string> shellwords(const string& s) {
+std::vector<std::string> shellwords(const std::string& s) {
   std::regex whitespace("^(\\s+).*");
   auto begin = s.cbegin();
-  std::vector<string> res;
+  std::vector<std::string> res;
   std::string cur;
   enum state { sBegin, sQuote };
   state st = sBegin;
@@ -90,14 +90,14 @@ static void _main(int argc, char** argv) {
 
   auto inShebang = false;
   std::string script;
-  std::vector<string> savedArgs;
+  std::vector<std::string> savedArgs;
 
   AutoDelete tmpDir(createTempDir("", myName));
 
   std::string outLink = "./result";
 
   // List of environment variables kept for --pure
-  std::set<string> keepVars{
+  std::set<std::string> keepVars{
       "HOME",         "USER", "LOGNAME", "DISPLAY",         "PATH", "TERM",
       "IN_NIX_SHELL", "TZ",   "PAGER",   "NIX_BUILD_SHELL", "SHLVL"};
 
@@ -405,7 +405,7 @@ static void _main(int argc, char** argv) {
     // Build or fetch all dependencies of the derivation.
     for (const auto& input : drv.inputDrvs) {
       if (std::all_of(envExclude.cbegin(), envExclude.cend(),
-                      [&](const string& exclude) {
+                      [&](const std::string& exclude) {
                         return !std::regex_search(input.first,
                                                   std::regex(exclude));
                       })) {
@@ -452,7 +452,7 @@ static void _main(int argc, char** argv) {
     for (auto& var : drv.env) {
       if (passAsFile.count(var.first) != 0u) {
         keepTmp = true;
-        string fn = ".attr-" + std::to_string(fileNr++);
+        std::string fn = ".attr-" + std::to_string(fileNr++);
         Path p = (Path)tmpDir + "/" + fn;
         writeFile(p, var.second);
         env[var.first + "Path"] = p;
@@ -489,7 +489,7 @@ static void _main(int argc, char** argv) {
             (Path)tmpDir, (pure ? "" : "p=$PATH; "),
             (pure ? "" : "PATH=$PATH:$p; unset p; "), dirOf(shell), shell,
             (getenv("TZ") != nullptr
-                 ? (string("export TZ='") + getenv("TZ") + "'; ")
+                 ? (std::string("export TZ='") + getenv("TZ") + "'; ")
                  : ""),
             envCommand));