The nix-shell command has popularized the concept of transient shell environments for development or testing purposes.
However, nix-shell is not the only way to create such environments, and even nix-shell itself can indirectly benefit from this library.
This library provides a set of functions that help create such environments.
devShellTools.valueToString
Converts Nix values to strings in the way the derivation built-in function does.
devShellTools.unstructuredDerivationInputEnv
Convert a set of derivation attributes (as would be passed to [derivation]) to a set of environment variables that can be used in a shell script.
This function does not support __structuredAttrs, but does support passAsFile.
devShellTools.derivationOutputEnv
Takes the relevant parts of a derivation and returns a set of environment variables, that would be present in the derivation.