←back to thread

Nix Derivation Madness

(fzakaria.com)
184 points birdculture | 2 comments | | HN request time: 0s | 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 #
tracnar ◴[] No.45776985[source]
What actually happens if you remove read permissions on the /nix/store directory? Do things still work? I suppose I'll need to try!
replies(1): >>45777171 #
kevincox ◴[] No.45777171[source]
https://github.com/NixOS/rfcs/blob/master/rfcs/0097-no-read-... is relevant.
replies(1): >>45777434 #
1. Ericson2314 ◴[] No.45777434[source]
Oh hmm did we never implement this? We should. Both because it is a good idea, and because accepted RFCs should be implemented.
replies(1): >>45777507 #
2. kevincox ◴[] No.45777507[source]
I'm not aware of it being done yet. But since the RFC is accepted it should be pretty straightforward.