e0d3a1c1a5
A reproduce script includes a logline that may resemble: > using these flags: --arg nixpkgs { outPath = /tmp/build-137689173/nixpkgs/source; rev = "fdc872fa200a32456f12cc849d33b1fdbd6a933c"; shortRev = "fdc872f"; revCount = 273100; } -I nixpkgs=/tmp/build-137689173/nixpkgs/source --arg officialRelease false --option extra-binary-caches https://hydra.nixos.org/ --option system x86_64-linux /tmp/build-137689173/nixpkgs/source/pkgs/top-level/release.nix -A These are passed along to nix-build and that's fine and dandy, but you can't just copy-paste this as is, as the `{}` introduces a syntax error and the value accompanying `-A` is `''`. A very naive approach is to just `printf "%q"` the individual args, which makes them safe to copy-paste. Unfortunately, this looks awful due to the liberal usage of slashes: ``` $ printf "%q" '{ outPath = /tmp/build-137689173/nixpkgs/source; rev = "fdc872fa200a32456f12cc849d33b1fdbd6a933c"; shortRev = "fdc872f"; revCount = 273100; }' \{\ outPath\ =\ /tmp/build-137689173/nixpkgs/source\;\ rev\ =\ \"fdc872fa200a32456f12cc849d33b1fdbd6a933c\"\;\ shortRev\ =\ \"fdc872f\"\;\ revCount\ =\ 273100\;\ \} ``` Alternatively, if we just use `set -x` before we execute nix-build, we'll get the whole invocation in a friendly, copy-pastable format that nicely displays `{}`-enclosed content and preserves the empty arg following `-A`: ``` running nix-build... using this invocation: + nix-build --arg nixpkgs '{ outPath = /tmp/build-138165173/nixpkgs/source; rev = "e0e4484f2c028d2269f5ebad0660a51bbe46caa4"; shortRev = "e0e4484"; revCount = 274008; }' -I nixpkgs=/tmp/build-138165173/nixpkgs/source --arg officialRelease false --option extra-binary-caches https://hydra.nixos.org/ --option system x86_64-linux /tmp/build-138165173/nixpkgs/source/pkgs/top-level/release.nix -A '' ``` |
||
---|---|---|
.. | ||
static | ||
all.tt | ||
auth.tt | ||
bootstrap-2.3.1.zip | ||
build-deps.tt | ||
build.tt | ||
channel-contents.tt | ||
common.tt | ||
dashboard-my-jobs-tab.tt | ||
dashboard-my-jobsets-tab.tt | ||
dashboard.tt | ||
deps.tt | ||
edit-jobset.tt | ||
edit-project.tt | ||
error.tt | ||
evals.tt | ||
flot-0.8.3.zip | ||
job-metrics-tab.tt | ||
job.tt | ||
jobset-channels-tab.tt | ||
jobset-eval.tt | ||
jobset-jobs-tab.tt | ||
jobset.tt | ||
layout.tt | ||
lazy_error.tt | ||
log.tt | ||
machine-status.tt | ||
machines.tt | ||
Makefile.am | ||
metric.tt | ||
news.tt | ||
overview.tt | ||
plain.tt | ||
product-list.tt | ||
project.tt | ||
queue-runner-status.tt | ||
queue-summary.tt | ||
queue.tt | ||
reproduce.tt | ||
runtime-deps.tt | ||
search.tt | ||
status.tt | ||
steps.tt | ||
topbar.tt | ||
user.tt | ||
users.tt |