mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
commit
b592359c56
3 changed files with 5 additions and 9 deletions
|
@ -1933,7 +1933,7 @@ void LocalDerivationGoal::runChild()
|
||||||
"can't map '%1%' to '%2%': mismatched impure paths not supported on Darwin",
|
"can't map '%1%' to '%2%': mismatched impure paths not supported on Darwin",
|
||||||
i.first, i.second.source);
|
i.first, i.second.source);
|
||||||
|
|
||||||
string path = i.first;
|
std::string path = i.first;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if (lstat(path.c_str(), &st)) {
|
if (lstat(path.c_str(), &st)) {
|
||||||
if (i.second.optional && errno == ENOENT)
|
if (i.second.optional && errno == ENOENT)
|
||||||
|
@ -1985,7 +1985,7 @@ void LocalDerivationGoal::runChild()
|
||||||
args.push_back("IMPORT_DIR=" + settings.nixDataDir + "/nix/sandbox/");
|
args.push_back("IMPORT_DIR=" + settings.nixDataDir + "/nix/sandbox/");
|
||||||
if (allowLocalNetworking) {
|
if (allowLocalNetworking) {
|
||||||
args.push_back("-D");
|
args.push_back("-D");
|
||||||
args.push_back(string("_ALLOW_LOCAL_NETWORKING=1"));
|
args.push_back(std::string("_ALLOW_LOCAL_NETWORKING=1"));
|
||||||
}
|
}
|
||||||
args.push_back(drv->builder);
|
args.push_back(drv->builder);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2383,14 +2383,10 @@ void LocalDerivationGoal::registerOutputs()
|
||||||
[&](DerivationOutputCAFloating dof) {
|
[&](DerivationOutputCAFloating dof) {
|
||||||
return newInfoFromCA(dof);
|
return newInfoFromCA(dof);
|
||||||
},
|
},
|
||||||
[&](DerivationOutputDeferred) {
|
[&](DerivationOutputDeferred) -> ValidPathInfo {
|
||||||
// No derivation should reach that point without having been
|
// No derivation should reach that point without having been
|
||||||
// rewritten first
|
// rewritten first
|
||||||
assert(false);
|
assert(false);
|
||||||
// Ugly, but the compiler insists on having this return a value
|
|
||||||
// of type `ValidPathInfo` despite the `assert(false)`, so
|
|
||||||
// let's provide it
|
|
||||||
return *(ValidPathInfo*)0;
|
|
||||||
},
|
},
|
||||||
}, output.output);
|
}, output.output);
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ struct LocalDerivationGoal : public DerivationGoal
|
||||||
Environment env;
|
Environment env;
|
||||||
|
|
||||||
#if __APPLE__
|
#if __APPLE__
|
||||||
typedef string SandboxProfile;
|
typedef std::string SandboxProfile;
|
||||||
SandboxProfile additionalSandboxProfile;
|
SandboxProfile additionalSandboxProfile;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -413,7 +413,7 @@ void LocalStore::findRuntimeRoots(Roots & roots, bool censor)
|
||||||
try {
|
try {
|
||||||
std::regex lsofRegex(R"(^n(/.*)$)");
|
std::regex lsofRegex(R"(^n(/.*)$)");
|
||||||
auto lsofLines =
|
auto lsofLines =
|
||||||
tokenizeString<std::vector<string>>(runProgram(LSOF, true, { "-n", "-w", "-F", "n" }), "\n");
|
tokenizeString<std::vector<std::string>>(runProgram(LSOF, true, { "-n", "-w", "-F", "n" }), "\n");
|
||||||
for (const auto & line : lsofLines) {
|
for (const auto & line : lsofLines) {
|
||||||
std::smatch match;
|
std::smatch match;
|
||||||
if (std::regex_match(line, match, lsofRegex))
|
if (std::regex_match(line, match, lsofRegex))
|
||||||
|
|
Loading…
Reference in a new issue