on master help sign in
nix-bundle.sh: Also take app-specific extra targets from the given FILE or default
bb26366haslersn
nix-bundle.sh+13−3
@@ -101,6 +101,18 @@ do
101 shift
101 shift
102done
102done
103
103
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+
104# Create tmp directory for the links produced by `nix build`
116# Create tmp directory for the links produced by `nix build`
105
117
106linkdir=$(mktemp -d)
118linkdir=$(mktemp -d)
@@ -142,9 +154,7 @@ fi
142# Determine bootstrap function -- This seems like a total hack!
154# Determine bootstrap function -- This seems like a total hack!
143
155
144bootstrap=nix-bootstrap
156bootstrap=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
148 bootstrap=nix-bootstrap-path
158 bootstrap=nix-bootstrap-path
149fi
159fi
150
160