about summary refs log tree commit diff
path: root/third_party/nix/src/nix-build
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix-build')
-rw-r--r--third_party/nix/src/nix-build/nix-build.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/nix/src/nix-build/nix-build.cc b/third_party/nix/src/nix-build/nix-build.cc
index 6906a805830e..938452f71667 100644
--- a/third_party/nix/src/nix-build/nix-build.cc
+++ b/third_party/nix/src/nix-build/nix-build.cc
@@ -6,6 +6,7 @@
 #include <vector>
 
 #include <absl/strings/ascii.h>
+#include <absl/strings/str_split.h>
 #include <glog/logging.h>
 
 #include "affinity.hh"
@@ -113,7 +114,7 @@ static void _main(int argc, char** argv) {
       !std::regex_search(argv[1], std::regex("nix-shell"))) {
     script = argv[1];
     try {
-      auto lines = tokenizeString<Strings>(readFile(script), "\n");
+      Strings lines = absl::StrSplit(readFile(script), absl::ByChar('\n'));
       if (std::regex_search(lines.front(), std::regex("^#!"))) {
         lines.pop_front();
         inShebang = true;
@@ -444,7 +445,8 @@ static void _main(int argc, char** argv) {
     env["NIX_STORE"] = store->storeDir;
     env["NIX_BUILD_CORES"] = std::to_string(settings.buildCores);
 
-    auto passAsFile = tokenizeString<StringSet>(get(drv.env, "passAsFile", ""));
+    StringSet passAsFile = absl::StrSplit(get(drv.env, "passAsFile", ""),
+                                          absl::ByAnyChar(" \t\n\r"));
 
     bool keepTmp = false;
     int fileNr = 0;