* Copying manifests is slightly tricky because

download-using-manifests expects that the files in
  /nix/var/nix/manifests are symlinks into the store.

svn path=/nixos/trunk/; revision=33727
This commit is contained in:
Eelco Dolstra 2012-04-10 15:36:50 +00:00
parent f37b453b19
commit f9ac67c67f
2 changed files with 14 additions and 12 deletions

View File

@ -83,13 +83,6 @@ mkdir -m 1775 -p $mountPoint/nix/store
chown root.nixbld $mountPoint/nix/store
# Make manifests available in the chroot.
rm -f $mountPoint/nix/var/nix/manifests/*
for i in /nix/var/nix/manifests/*.nixmanifest; do
cp "$(readlink -f "$i")" $mountPoint/nix/var/nix/manifests
done
# Get the store paths to copy from the references graph.
storePaths=$(@perl@/bin/perl @pathsFromGraph@ @nixClosure@)
@ -129,15 +122,24 @@ mkdir -m 0755 -p $mountPoint/bin
ln -sf @shell@ $mountPoint/bin/sh
if test -n "$NIXOS_PREPARE_CHROOT_ONLY"; then
echo "User requested only to prepare chroot. Exiting."
exit 0;
fi
# Make the build below copy paths from the CD if possible. Note that
# /mnt in the chroot is the root of the CD.
export NIX_OTHER_STORES=/mnt/nix:$NIX_OTHER_STORES
if test -n "$NIXOS_PREPARE_CHROOT_ONLY"; then
echo "User requested only to prepare chroot. Exiting."
exit 0;
fi
# Make manifests available in the chroot.
rm -f $mountPoint/nix/var/nix/manifests/*
for i in /nix/var/nix/manifests/*.nixmanifest; do
chroot $mountPoint @nix@/bin/nix-store -r "$(readlink -f "$i")" > /dev/null
cp -pd "$i" $mountPoint/nix/var/nix/manifests/
done
# Build the specified Nix expression in the target store and install
# it into the system configuration profile.

View File

@ -122,7 +122,7 @@ let
"rm /etc/hosts",
"echo 192.168.1.1 nixos.org > /etc/hosts",
"ifconfig eth1 up 192.168.1.2",
"nix-pull http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable/MANIFEST",
"nixos-rebuild pull",
);
# Test nix-env.