←back to thread

Nix Derivation Madness

(fzakaria.com)
184 points birdculture | 1 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 #
XorNot ◴[] No.45777560[source]
The reason it's like this is because the only way to reliably grab it is to cut the string at the first hyphen - then the rest can be almost free text.

It you do it the other way it's harder. You can try this with nix commands /nix/store/<hash>-x is a valid way to refer to something in the store most of the time.

replies(1): >>45781480 #
Kudos ◴[] No.45781480[source]
You could just use the last hyphen. It's not as simple since you need to scan the whole string, but it certainly doesn't seem like a challenge to me.
replies(1): >>45785694 #
1. XorNot ◴[] No.45785694{3}[source]
Yes but why pay that runtime cost for a problem the user can solve in human time using grep?