From 1789c56f430b935ac2c17153317947a7fcf4f07f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 4 Dec 2019 00:36:04 +0100 Subject: [PATCH] Fix macOS build https://hydra.nixos.org/build/107716759 --- src/nix/command.cc | 3 +++ src/nix/installables.hh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nix/command.cc b/src/nix/command.cc index de761166b..2da5736e7 100644 --- a/src/nix/command.cc +++ b/src/nix/command.cc @@ -4,6 +4,8 @@ #include "nixexpr.hh" #include "profiles.hh" +extern char * * environ; + namespace nix { Commands * RegisterCommand::commands = nullptr; @@ -175,6 +177,7 @@ void MixEnvironment::setEnviron() { auto val = getenv(var.c_str()); if (val) stringsEnv.emplace_back(fmt("%s=%s", var.c_str(), val)); } + vectorEnv = stringsToCharPtrs(stringsEnv); environ = vectorEnv.data(); } else { diff --git a/src/nix/installables.hh b/src/nix/installables.hh index 9388c673e..612c8ac92 100644 --- a/src/nix/installables.hh +++ b/src/nix/installables.hh @@ -10,7 +10,7 @@ namespace nix { struct Value; struct DrvInfo; class EvalState; -class SourceExprCommand; +struct SourceExprCommand; struct Buildable {