File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,7 +117,13 @@ if [ -d "$BIN_DIR" ] && ls -A "$BIN_DIR" 2>/dev/null | grep -q .; then
117117 # fully-resolved path is under /nix.
118118 if [ -L " $f " ]; then
119119 direct=$( readlink " $f " )
120- [[ " $direct " == /nix/* ]] && continue
120+ if [[ " $direct " == /nix/* ]]; then
121+ if [ " $CONTAINER_TYPE " = " nixos" ]; then
122+ # NixOS container has its own /nix store; host /nix paths will not exist inside it.
123+ bad+=(" $( basename " $f " ) -> $direct (symlink to host /nix path; will not work in NixOS container with separate /nix store)" )
124+ fi
125+ continue
126+ fi
121127 bad+=(" $( basename " $f " ) -> $direct (symlink does not point directly into /nix)" )
122128 continue
123129 fi
@@ -138,7 +144,7 @@ if [ -d "$BIN_DIR" ] && ls -A "$BIN_DIR" 2>/dev/null | grep -q .; then
138144 if [ ${# bad[@]} -gt 0 ]; then
139145 echo " Error: the following .bin/ entries will not work inside the container:" >&2
140146 for b in " ${bad[@]} " ; do echo " $b " >&2 ; done
141- echo " Only Nix-store symlinks ( /nix/...) and statically-linked binaries are supported." >&2
147+ echo " Only symlinks into the container's own /nix store and statically-linked binaries are supported." >&2
142148 exit 1
143149 fi
144150fi
You can’t perform that action at this time.
0 commit comments