reproduce.tt: Add --print-flags option

[?]
May 26, 2015, 2:36 PM
UROSQNYPEQJWILVG7JFJYT673C5IL4RXCKZKBUKGXXZND7JK6DLAC

Dependencies

  • [2] TL7KZWSU reproduce.tt: Use color
  • [3] MRINNBYY reproduce.tt: Add option to fetch but not build
  • [4] SM5PVIIJ reproduce.tt: Use -I instead of $NIX_PATH
  • [5] HZWUT4YN Allow users to reproduce builds on their own systems
  • [6] 5Q4ZLL37 reproduce.tt: Add --help flag

Change contents

  • edit in src/root/reproduce.tt at line 19
    [3.11]
    [4.124]
    printFlags=
  • edit in src/root/reproduce.tt at line 50
    [3.59]
    [4.1078]
    --print-flags
    Fetch the inputs, then print the argument to nix-build on stdout
    and exit.
  • edit in src/root/reproduce.tt at line 68
    [3.116]
    [4.1373]
    elif [ "$arg" = --print-flags ]; then
    printFlags=1
  • edit in src/root/reproduce.tt at line 198
    [4.3499]
    [2.447]
    args+=("$nixExprInputDir/[% build.nixexprpath %]" -A '[% build.job.name %]')
    if [ -n "$printFlags" ]; then
    first=1
    for i in "${args[@]}"; do
    if [ -z "$first" ]; then printf " "; fi
    first=
    printf "%q" "$i"
    done
    exit 0
    fi
  • replacement in src/root/reproduce.tt at line 213
    [4.3568][2.476:591]()
    exec nix-build "$nixExprInputDir/[% build.nixexprpath %]" -A '[% build.job.name %]' "${args[@]}" "${extraArgs[@]}"
    [4.3568]
    exec nix-build "${args[@]}" "${extraArgs[@]}"