How can I tell what nix-shell derivation lorri has built

I’m trying to set up my project’s build scripts to fail if they are run in an outdated nix environment. For developers using nix-shell to enter the environment, I can do this by comparing $out to the output of nix-instantiate --eval --expr 'let shell = import ./shell.nix {}; in "${shell}"', which for example in my project currently are both "/nix/store/jdw8jp56kbwhfpannlgagpmpzajk3k04-ghc-shell-for-packages-0"

But when using lorri instead of nix-shell, $out is set to /nix/store/dn4wlji0yxrrg687cqh9q2zyb5qyblkk-lorri-keep-env-hack-ghc-shell-for-packages-0 instead. I tried grepping through files in that folder to find any reference to jdw8jp56kbwhfpannlgagpmpzajk3k04-ghc-shell-for-packages-0, but I couldn’t find any.

Is there some way I can determine the shell derivation that the current lorri environment is based on? I’ve been looking for either something in the lorri environment, or a way to inspect the lorri env output (possibly traversing through multiple referenced outputs), or a nix expression that could calculate the expected lorri derivation hash for a give shell.nix file, or a nix expression that could extract the shell.nix derivation or hash from a lorri derivation, or something I can add to my shell.nix so that lorri exposes the hash of the original shell derivation in the environment, but I haven’t yet been able to find any way to do this.

Does anyone have any ideas about how this might be done, or know enough about lorri internals to know weather this could feasibly be added to lorri?