This is such a cool and funny use of derivations. He defines a Nix attribute path that emulates game state in Super Mario 3 so that you can say
nix build '.#level1.rightb.rightb.rightab.rightb'
And it outputs the screenshot that results in that sequence of button presses. And shared prefixes cache to the same hash, so Nix caches every step so that you can try different button sequences and only have to calculate from the point that you've reached a unique sequence.
This is such a cool and funny use of derivations. He defines a Nix attribute path that emulates game state in Super Mario 3 so that you can say
And it outputs the screenshot that results in that sequence of button presses. And shared prefixes cache to the same hash, so Nix caches every step so that you can try different button sequences and only have to calculate from the point that you've reached a unique sequence.