@@ -35,15 +35,15 @@ Synopsis:
35
35
This is usually done in the following cases:
36
36
37
37
1. Single target fix: current bootstrap files for a single target
38
- are problematic for some reason (target-specific bug). In this
39
- case we can refresh just that target as:
38
+ are problematic for some reason (target-specific bug). In this
39
+ case we can refresh just that target as:
40
40
41
- \$ $0 --commit --targets=i686-unknown-linux-gnu
41
+ \$ $0 --commit --targets=i686-unknown-linux-gnu
42
42
43
43
2. Routine refresh: all bootstrap files should be refreshed to avoid
44
- debugging problems that only occur on very old binaries.
44
+ debugging problems that only occur on very old binaries.
45
45
46
- \$ $0 --commit --all-targets
46
+ \$ $0 --commit --all-targets
47
47
48
48
To get help on uploading refreshed binaries to 'tarballs.nixos.org'
49
49
please have a look at <maintainers/scripts/bootstrap-files/README.md>.
@@ -232,50 +232,50 @@ for target in "${targets[@]}"; do
232
232
# - build time: ${build_time}
233
233
{
234
234
EOF
235
- for p in " ${outpath} /on-server" /* ; do
236
- fname=$( basename " $p " )
237
- fnames+=(" $fname " )
238
- case " $fname " in
239
- bootstrap-tools.tar.xz) attr=bootstrapTools ;;
240
- busybox) attr=$fname ;;
241
- unpack.nar.xz) attr=unpack ;;
242
- * ) die " Don't know how to map '$fname ' to attribute name. Please update me."
243
- esac
244
-
245
- executable_arg=
246
- executable_nix=
247
- if [[ -x " $p " ]]; then
248
- executable_arg=" --executable"
249
- executable_nix=" executable = true;"
250
- fi
251
- unpack_nix=
252
- name_nix=
253
- if [[ $fname = * .nar.xz ]]; then
254
- unpack_nix=" unpack = true;"
255
- name_nix=" name = \" ${fname% .nar.xz} \" ;"
256
- sri=$( nar_sri_get " $p " " ${fname% .nar.xz} " )
257
- [[ $? -ne 0 ]] && die " Failed to get hash of '$p '"
258
- else
259
- sha256=$( nix-prefetch-url $executable_arg --name " $fname " " file://$p " )
260
- [[ $? -ne 0 ]] && die " Failed to get the hash for '$p '"
261
- sri=$( nix-hash --to-sri " sha256:$sha256 " )
262
- [[ $? -ne 0 ]] && die " Failed to convert '$sha256 ' hash to an SRI form"
263
- fi
264
-
265
- # individual file entries
266
- cat << EOF
267
- $attr = import <nix/fetchurl.nix> {
235
+ for p in " ${outpath} /on-server" /* ; do
236
+ fname=$( basename " $p " )
237
+ fnames+=(" $fname " )
238
+ case " $fname " in
239
+ bootstrap-tools.tar.xz) attr=bootstrapTools ;;
240
+ busybox) attr=$fname ;;
241
+ unpack.nar.xz) attr=unpack ;;
242
+ * ) die " Don't know how to map '$fname ' to attribute name. Please update me."
243
+ esac
244
+
245
+ executable_arg=
246
+ executable_nix=
247
+ if [[ -x " $p " ]]; then
248
+ executable_arg=" --executable"
249
+ executable_nix=" executable = true;"
250
+ fi
251
+ unpack_nix=
252
+ name_nix=
253
+ if [[ $fname = * .nar.xz ]]; then
254
+ unpack_nix=" unpack = true;"
255
+ name_nix=" name = \" ${fname% .nar.xz} \" ;"
256
+ sri=$( nar_sri_get " $p " " ${fname% .nar.xz} " )
257
+ [[ $? -ne 0 ]] && die " Failed to get hash of '$p '"
258
+ else
259
+ sha256=$( nix-prefetch-url $executable_arg --name " $fname " " file://$p " )
260
+ [[ $? -ne 0 ]] && die " Failed to get the hash for '$p '"
261
+ sri=$( nix-hash --to-sri " sha256:$sha256 " )
262
+ [[ $? -ne 0 ]] && die " Failed to convert '$sha256 ' hash to an SRI form"
263
+ fi
264
+
265
+ # individual file entries
266
+ cat << EOF
267
+ $attr = import <nix/fetchurl.nix> {
268
268
url = "http://tarballs.nixos.org/${s3_prefix} /${nixpkgs_revision} /$fname ";
269
269
hash = "${sri} ";$(
270
270
[[ -n ${executable_nix} ]] && printf " \n %s" " ${executable_nix} "
271
271
[[ -n ${name_nix} ]] && printf " \n %s" " ${name_nix} "
272
272
[[ -n ${unpack_nix} ]] && printf " \n %s" " ${unpack_nix} "
273
- )
274
- };
273
+ )
274
+ };
275
275
EOF
276
- done
277
- # footer
278
- cat << EOF
276
+ done
277
+ # footer
278
+ cat << EOF
279
279
}
280
280
EOF
281
281
} > " ${target_file} "
0 commit comments