[Nix-dev] Installing nix with $prefix != /nix

Eelco Dolstra eelco at cs.uu.nl
Mon Aug 21 15:44:51 CEST 2006


Hi,

SIGOURE Benoit wrote:

> I'm installing Nix on an NFS share so that our users can have (read only) access
> to an up to date Nix install (packages and stuff are updated by a daily
> crontab). Unfortunately, I can't install it under /nix. Here is what I've done
> so far:
> 
> /tmp/nix-0.10pre6097 $ ./configure --prefix=/lrde/dev/linux-x86/nix
> [...]
> error: path `/nix/store/6j4aa0mzhnxpj5nd1lr283ns9bjnzv9k-setup-hook.sh' is not
> in the Nix store

The main problem is that our channels assume that your Nix store is
/nix/store.  The reason is that Unix binaries are generally not
relocatable (since they tend to contain lots of paths baked in at
compile time), so they wouldn't work in your prefix.

You can however still use the nixpkgs distributions directly.  For
instance, you can download


http://nix.cs.uu.nl/dist/nix/nixpkgs-0.10pre6088/nixpkgs-0.10pre6088.tar.bz2

unpack it, and do "nix-env -f nixpkgs-0.10pre6088/ -i bla" to install
packages.  They will be compiled from source, however.

It would be nice if channels could still be used by people with a
different $prefix.  You wouldn't get the binaries, but it would still be
useful as a source deployment mechanism.  I'll make an issue about this.

Incidentally, there is also another potential problem in your setup: Nix
uses Berkeley DB, and Berkeley DB doesn't really like NFS, as described
here:

  http://www.sleepycat.com/docs/ref/env/remote.html

This probably won't be a problem unless you try to run Nix from multiple
machines simultaneously.

-- 
Eelco Dolstra | http://www.cs.uu.nl/~eelco



More information about the nix-dev mailing list