Replies: 2 comments 2 replies
-
I'm concerned that the list of build inputs can be arbitrarily long, and perhaps in practice it does indeed happen to be very long on occasion. I'm leaning towards having just "impure" to indicate the presence of those build inputs. Users can query additional details manually. This is similar to the git segment showing just the number of modified files but not the actual files names. Come to think of it, would it be helpful to include the number of build inputs next to "impure"? |
Beta Was this translation helpful? Give feedback.
-
You can implement it as a custom prompt segment. I'm not sure it's super useful in the core p10k. |
Beta Was this translation helpful? Give feedback.
-
Currently, p10k will display the nix logo and either pure or impure based on the environment variable IN_NIX_SHELL, which is set by nix-shell.
Example segment: * impure
nix-shell also sets the environment variable buildInputs, for example:
buildInputs=/nix/store/f6cgapys8iaafbh0fn83j562l1vrgcmh-inxi-3.3.04-1 /nix/store/w6q900b5kazwj4j8mhgsdqy4z1q2cbwx-dmidecode-3.5
It is pretty easy to split off the build inputs and add them to the segment:
Example proposed segment: * impure inxi-3.3.04-1 dmidecode-3.5
The version number at the end could be stripped off as well.
Is this something of interest and is it acceptable performance-wise to include in the code p10k code? I feel it is pretty useful information to have when running a nix-shell. I could prepare a pull request, but wanted to gauge interest first.
Rough parsing code:
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions