Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wouldn't this all be a bit easier if the hashes in guix/nix were relative to some global destination store location, rather than /nix or /guix?


Thanks to user namespaces, it's easy to map, say, /home/myself/gnu to /gnu, as shown in the article (with "unshare").

For cases where user namespaces are unavailable, Pjotr Prins wrote a neat hack that allows users to "relocate" binaries to a different file system location by rewriting file names in the binaries: https://github.com/pjotrp/gnu-install-bin . Scary to some, but definitely does the job. :-)


What would that look like?


I need to look at how pack is implemented, maybe I'm missing something. I already used this to install guile 2.2 on a debian machine, so I'm excited for this development.

But to clarify my point - instead of all the content hashes being based on "/guix/store", they'd be based on "guix/store", which would be relative to a configured "store root" to the daemon (or defaulting to /).

Then packages generated would also have relative links, thus "installing a package from guix" would just be a matter of downloading the dependency graph, and tucking away wherever you please.


Without using absolute file names you'd have lookup problems everywhere.


Yeah, ran into this when thinking more about this on the bus. Sorry for the distraction.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: