* Build through the Nix daemon if it's running.

svn path=/nixos/trunk/; revision=11966
This commit is contained in:
Eelco Dolstra 2008-06-04 09:01:54 +00:00
parent 33aae3136a
commit bd33b3e756

View File

@ -29,6 +29,17 @@ NIXPKGS=${NIXPKGS:-$NIXOS/pkgs}
NIXOS_CONFIG=${NIXOS_CONFIG:-/etc/nixos/configuration.nix}
# If the Nix daemon is running, then use it. This allows us to use
# the latest Nix from Nixpkgs (below) for expression evaluation, while
# still using the old Nix (via the daemon) for actual store access.
# This matters if the new Nix in Nixpkgs has a schema change. It
# would upgrade the schema, which should only happen once we actually
# switch to the new configuration.
if initctl status nix-daemonn 2>&1 | grep -q ' running'; then
export NIX_REMOTE=${NIX_REMOTE:-daemon}
fi
# Pull the manifests defined in the configuration (the "manifests"
# attribute). Wonderfully hacky.
if test "${NIXOS_PULL:-1}" != 0; then