mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 19:55:41 +03:00
Fix Nix database in generated images
This prevents seeing lots of warnings about missing hashes/sizes in the database when running "nix-store --verify --check-contents" for the first time.
This commit is contained in:
parent
b3347287be
commit
64aed5e78f
1 changed files with 4 additions and 0 deletions
|
@ -79,6 +79,10 @@ pkgs.vmTools.runInLinuxVM (
|
|||
printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \
|
||||
chroot /mnt ${config.nix.package}/bin/nix-store --load-db --option build-users-group ""
|
||||
|
||||
# Add missing size/hash fields to the database. FIXME:
|
||||
# exportReferencesGraph should provide these directly.
|
||||
chroot /mnt ${config.nix.package}/bin/nix-store --verify --check-contents
|
||||
|
||||
# Create the system profile to allow nixos-rebuild to work.
|
||||
chroot /mnt ${config.nix.package}/bin/nix-env --option build-users-group "" \
|
||||
-p /nix/var/nix/profiles/system --set ${config.system.build.toplevel}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue