mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 00:06:16 +02:00
Fix usage of structured attrs for nix develop
This commit is contained in:
parent
3944a120ec
commit
447928bdb5
2 changed files with 12 additions and 1 deletions
|
@ -256,6 +256,11 @@ struct Common : InstallableCommand, MixProfile
|
|||
// FIXME: properly unquote 'outputs'.
|
||||
StringMap rewrites;
|
||||
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);
|
||||
assert(from != buildEnvironment.env.end());
|
||||
// FIXME: unquote
|
||||
|
|
|
@ -8,7 +8,13 @@ if [[ -n $stdenv ]]; then
|
|||
source $stdenv/setup
|
||||
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
|
||||
export > ${!__output}
|
||||
set >> ${!__output}
|
||||
|
|
Loading…
Reference in a new issue