repl: allow :p to print derivation attrs.

Change-Id: I6a6a6964a58c3340acca9272c616c079c5218d6e
This commit is contained in:
Lunaphied
2025-11-19 17:46:52 +01:00
parent 04a4b15991
commit f3b2f3496b
5 changed files with 66 additions and 5 deletions
@@ -100,3 +100,15 @@ Printing an environment with :env after adding a variable to the scope
Env level 1
abort baseNameOf break builtins derivation derivationStrict dirOf false fetchGit fetchMercurial fetchTarball fetchTree fromTOML import isNull map null placeholder removeAttrs scopedImport throw toString true
Printing a derivation or something
nix-repl> fakeDrv = let drvAttrs = { builder = "meow"; system = "meower"; name = "mrowmrow"; }; in { inherit (drvAttrs) builder system name; inherit drvAttrs; type = "derivation"; }
nix-repl> :p fakeDrv
{
builder = "meow";
drvAttrs = «3 attributes elided»;
name = "mrowmrow";
system = "meower";
type = "derivation";
}