Fix macOS build

https://hydra.nixos.org/build/107716759
This commit is contained in:
Eelco Dolstra 2019-12-04 00:36:04 +01:00
parent c3c23a52ee
commit 1789c56f43
2 changed files with 4 additions and 1 deletions

View file

@ -4,6 +4,8 @@
#include "nixexpr.hh" #include "nixexpr.hh"
#include "profiles.hh" #include "profiles.hh"
extern char * * environ;
namespace nix { namespace nix {
Commands * RegisterCommand::commands = nullptr; Commands * RegisterCommand::commands = nullptr;
@ -175,6 +177,7 @@ void MixEnvironment::setEnviron() {
auto val = getenv(var.c_str()); auto val = getenv(var.c_str());
if (val) stringsEnv.emplace_back(fmt("%s=%s", var.c_str(), val)); if (val) stringsEnv.emplace_back(fmt("%s=%s", var.c_str(), val));
} }
vectorEnv = stringsToCharPtrs(stringsEnv); vectorEnv = stringsToCharPtrs(stringsEnv);
environ = vectorEnv.data(); environ = vectorEnv.data();
} else { } else {

View file

@ -10,7 +10,7 @@ namespace nix {
struct Value; struct Value;
struct DrvInfo; struct DrvInfo;
class EvalState; class EvalState;
class SourceExprCommand; struct SourceExprCommand;
struct Buildable struct Buildable
{ {