[Nix-dev] Why is the /nix/store location hardcoded?

Marc Weber marco-oweber at gmx.de
Fri Apr 23 14:34:29 CEST 2010


Excerpts from David Soergel's message of Thu Apr 22 00:51:15 +0200 2010:
> Is there some compelling reason why the location of the nix store is
> fixed at compile time, and why nix-push/nix-pull can only work among
> machines that agree on the location of the store?

hardcoding /nix/store (or a different path) at compilation time is the
only way to make things work always.

Imagine having an application which creates a check-sum for its
executable after installation.

Now imagine the executable having a hardcoded path to /nix/store/...

Whil this is hypothetical there are quite lots of packages which do
compile paths into their executables.

If you're lucky you could use sed to replace them. But may break if path
length differ.

So packages hardcoding /nix/store paths in their executable is another
reason.

Marc Weber



More information about the nix-dev mailing list