@@ -101,6 +101,18 @@ do
101101 shift
102102done
103103
104+# Add application-specific extra targets
105+
106+if [ "${targets[0]}" = "nix-bundle" ] || [ "${targets[0]}" = "nixStable" ] || [ "${targets[0]}" = "nixUnstable" ] || [ "${targets[0]}" = "nix" ]
107+then
108+ targets+=("bash")
109+ targets+=("bzip2")
110+ targets+=("coreutils")
111+ targets+=("gnutar")
112+ targets+=("gzip")
113+ targets+=("xz")
114+fi
115+
104116# Create tmp directory for the links produced by `nix build`
105117
106118linkdir=$(mktemp -d)
@@ -142,9 +154,7 @@ fi
142154# Determine bootstrap function -- This seems like a total hack!
143155
144156bootstrap=nix-bootstrap
145−if [ "${targets[0]}" = "nix-bundle" ] || [ "${targets[0]}" = "nixStable" ] || [ "${targets[0]}" = "nixUnstable" ] || [ "${targets[0]}" = "nix" ]; then
146− bootstrap=nix-bootstrap-nix
147−elif ! [ -z "$extra_target_paths" ]; then
157+if ! [ -z "$extra_target_paths" ]; then
148158 bootstrap=nix-bootstrap-path
149159fi
150160