And a –dir flag to override the directory where inputs etc. are stored.
5Q4ZLL37EZJQJ2VJW2Z5NRR4C7TA6657HLZXXKM4UWSGEMII7SRQC
export NIX_PATH=
This script will reproduce Hydra build [% build.id %] of job [%
build.project.name %]:[% build.jobset.name %]:[% build.job.name +%]
(available at [%+ c.uri_for('/build' build.id) +%]). It will fetch
all inputs of the Hydra build, then invoke Nix to build the job and
all its dependencies.
The inputs will be stored in $tmpDir. This can be overriden using the
--dir flag. After the build, the result of the build is available via
the symlink $tmpDir/result.
Flags:
--dir PATH
Override the location where the inputs and result symlink are stored.
--run-env
Fetch the inputs and build the dependencies, then start an
interactive shell in which the environment is equal to that used
to perform the build. See the description of the --run-env flag
in the nix-build(1) manpage for more details.
Any additional flags are passed to nix-build. See the nix-build(1)
manpage for details.
EOF
exit 0
elif [ "$arg" = --dir ]; then
tmpDir="$1"
if [ -z "$tmpDir" ]; then
echo "$0: --dir requires an argument" >&2
exit 1
fi
shift
else
extraArgs+=("$arg")
fi
done