←back to thread

Nix Derivation Madness

(fzakaria.com)
184 points birdculture | 2 comments | | HN request time: 0.001s | source
Show context
eviks ◴[] No.45773806[source]
> nix/store/24v9wpp393ib1gllip7ic13aycbi704g-ruby-3.3.9.drv

A different type of madness, but are ugly names so common, why not start with ruby-3.3.9 so any list of files is semantically sorted/readable?

replies(6): >>45773869 #>>45774382 #>>45774390 #>>45776319 #>>45777560 #>>45778772 #
Kootle ◴[] No.45774390[source]
In nix packages (derivations) are so lightweight that your store has tens of thousands of them, many with the same name, or with no meaningful name at all. On the rare occasions that you need to look in the store for a package you’re much more likely to be looking for a particular hash than a particular name. That, and having the hash as a prefix looks nicer in tabular output.
replies(2): >>45774723 #>>45780928 #
Ericson2314 ◴[] No.45774723[source]
If I had my way

1. store paths would have no names at all

2. listing the contents of the store directory would not be allowed

3. store paths have more bits of information

Then store paths are halfway decent (but non-revocable) capabilities.

replies(3): >>45774760 #>>45775711 #>>45776985 #
1. vatsachakrvthy ◴[] No.45774760{3}[source]
How could one debug if we couldn't view contents of the store directory?
replies(1): >>45774939 #
2. Ericson2314 ◴[] No.45774939[source]
You can still read individual store objects in their entirety. You just need to know the store path for the object that you want to read.

You can still use root or something to list all the store paths. (But ideally nothing else would be running as root / with that power.)