nix develop: Set personality
This makes 'nix develop' set the Linux personality in the same way that the actual build does, allowing a command like 'nix develop nix#devShells.i686-linux.default' on x86_64-linux to work correctly.
This commit is contained in:
+9
-1
@@ -164,6 +164,14 @@ struct BuildEnvironment
|
||||
{
|
||||
return vars == other.vars && bashFunctions == other.bashFunctions;
|
||||
}
|
||||
|
||||
std::string getSystem() const
|
||||
{
|
||||
if (auto v = get(vars, "system"))
|
||||
return getString(*v);
|
||||
else
|
||||
return settings.thisSystem;
|
||||
}
|
||||
};
|
||||
|
||||
const static std::string getEnvSh =
|
||||
@@ -570,7 +578,7 @@ struct CmdDevelop : Common, MixEnvironment
|
||||
}
|
||||
}
|
||||
|
||||
runProgramInStore(store, shell, args);
|
||||
runProgramInStore(store, shell, args, buildEnvironment.getSystem());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user