mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Print derivation paths in nix eval
`nix eval` forces values and prints derivations as attribute sets, so commands that print derivations (e.g. `nix eval nixpkgs#bash`) will infinitely loop and segfault. Printing derivations as `.drv` paths makes `nix eval` complete as expected. Further work is needed, but this is better than a segfault.
This commit is contained in:
parent
3120fef01b
commit
4910d74086
1 changed files with 11 additions and 2 deletions
|
@ -120,8 +120,17 @@ struct CmdEval : MixJSON, InstallableValueCommand, MixReadOnlyOption
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
state->forceValueDeep(*v);
|
logger->cout(
|
||||||
logger->cout("%s", ValuePrinter(*state, *v, PrintOptions { .force = true }));
|
"%s",
|
||||||
|
ValuePrinter(
|
||||||
|
*state,
|
||||||
|
*v,
|
||||||
|
PrintOptions {
|
||||||
|
.force = true,
|
||||||
|
.derivationPaths = true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue