commit 0b8a1bd32ebdd1b9a6d27069ac5ae81f676adebd
parent ab29a98dd31b1654810bf719c4c8998ca8b63e9b
Author: Jan Pobříslo <ccx@te2000.cz>
Date: Thu, 23 Jun 2022 02:43:31 +0200
Fix check for manifest.nix
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/zsh-functions/confz_containers_init b/zsh-functions/confz_containers_init
@@ -1046,8 +1046,9 @@ confz_container_nix_packages_installed_check() {
:image_name
local root=$vars[containers_dir]/systems/$vars[image_name]
- local profile_dir=$root/nix/var/nix/profiles/per-user/root/profile
local -A stat_info
+
+ local profile_dir=$root/nix/var/nix/profiles/per-user/root/profile
zstat -L -H stat_info $profile_dir
# while it's a symlink
while (( $stat_info[mode] >> 12 == 10 )); do
@@ -1072,9 +1073,9 @@ confz_container_nix_packages_installed_check() {
fi
zstat -L -H stat_info $manifest_file
done
-
- [[ -f $profile_dir/manifest.nix ]] || \
+ [[ -f $manifest_file ]] || \
die "Could not find manifest.nix file: ${(qqq)manifest_file}"
+
local -a world=( "${(@f)$(
grep -o 'outPath = "[^"]*"' $manifest_file \
| uniq | sed 's|^outPath = "/nix/store/[^-]*-||;s|"$||'