I opened a Nix shell the other day so I could run the diceware
program. nix-shell had to install some things first; edited for clarity, they were
$ nix-shell -p diceware --run 'diceware --help'
these paths will be fetched (1.94 MiB download, 10.59 MiB unpacked):
/nix/store/...-bash-interactive-4.4-p23
/nix/store/...-bash-interactive-4.4-p23-dev
/nix/store/...-bash-interactive-4.4-p23-doc
/nix/store/...-bash-interactive-4.4-p23-info
/nix/store/...-bash-interactive-4.4-p23-man
/nix/store/...-diceware-0.9.6
/nix/store/...-python3.7-setuptools-44.0.0
/nix/store/...-readline-7.0p5
The program is written in Python, so I understand where the python3.7-setuptools
dependency is coming from. I understand that nix-shell’s job, in general, is to run Bash for you, so I understand the first Bash dependency listed, as well as the readline dependency.
My question is: why does starting this shell require bash-interactive-4.4-p23-man and -info, which hold Bash documentation? Or the -dev derivation, which seems to only contain C headers and a pkg-config support file? If these things are considered somewhat separate derivations by Nix, to the extent that they are listed, downloaded, and installed separately from each other, why are they installed in this situation, where I haven’t requested them? Or, if these support packages always come along for the ride when you install Bash, why bother splitting up the derivations like this?
(Just to be clear, I’m asking this because I’m curious, not because I begrudge Nix the extra 2 MB these docs are taking up )