forked from lix-project/lix
Fix usage of structured attrs for nix develop
This commit is contained in:
parent
3944a120ec
commit
447928bdb5
|
@ -256,6 +256,11 @@ struct Common : InstallableCommand, MixProfile
|
||||||
// FIXME: properly unquote 'outputs'.
|
// FIXME: properly unquote 'outputs'.
|
||||||
StringMap rewrites;
|
StringMap rewrites;
|
||||||
for (auto & outputName : tokenizeString<std::vector<std::string>>(replaceStrings(outputs->second.quoted, "'", ""))) {
|
for (auto & outputName : tokenizeString<std::vector<std::string>>(replaceStrings(outputs->second.quoted, "'", ""))) {
|
||||||
|
std::regex ptrn(R"re(\[([A-z0-9]+)\]=.*)re");
|
||||||
|
std::smatch match;
|
||||||
|
if (std::regex_match(outputName, match, ptrn)) {
|
||||||
|
outputName = match[1];
|
||||||
|
}
|
||||||
auto from = buildEnvironment.env.find(outputName);
|
auto from = buildEnvironment.env.find(outputName);
|
||||||
assert(from != buildEnvironment.env.end());
|
assert(from != buildEnvironment.env.end());
|
||||||
// FIXME: unquote
|
// FIXME: unquote
|
||||||
|
|
|
@ -8,7 +8,13 @@ if [[ -n $stdenv ]]; then
|
||||||
source $stdenv/setup
|
source $stdenv/setup
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for __output in $outputs; do
|
if [ -e .attrs.sh ]; then
|
||||||
|
__olist="${!outputs[@]}"
|
||||||
|
else
|
||||||
|
__olist=$outputs
|
||||||
|
fi
|
||||||
|
|
||||||
|
for __output in $__olist; do
|
||||||
if [[ -z $__done ]]; then
|
if [[ -z $__done ]]; then
|
||||||
export > ${!__output}
|
export > ${!__output}
|
||||||
set >> ${!__output}
|
set >> ${!__output}
|
||||||
|
|
Loading…
Reference in a new issue