diff options
author | aszlig <aszlig@redmoonstudios.org> | 2016-06-05 17:07:57 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2016-06-05 17:07:57 +0200 |
commit | afa9e7dbec5902c74ed6dceddab224c2bd34a6ad (patch) | |
tree | 4bf0b85bfea2e4b380a9dd7cc144d8ac3d04c444 /modules/user/aszlig/programs/taalo-build | |
parent | 8e68d2b9ae4ac0f358d80fed9cc99a84da42ef04 (diff) |
taalo-build: Fix picking up derivation paths
Regression introduced by fba5c2469bd5e95857c4ffd9db3dd0529f2485f3. The derivation paths returned by nix-instantiate are usually valid store paths, except when used with --add-root. In case of the latter, we get the root symlink back, so we need to do an additional readlink on it. We also now pass -t to mktemp so that $TMPDIR or /tmp is used instead of the current working directory. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules/user/aszlig/programs/taalo-build')
-rw-r--r-- | modules/user/aszlig/programs/taalo-build/default.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/user/aszlig/programs/taalo-build/default.nix b/modules/user/aszlig/programs/taalo-build/default.nix index 71825610..3e89436a 100644 --- a/modules/user/aszlig/programs/taalo-build/default.nix +++ b/modules/user/aszlig/programs/taalo-build/default.nix @@ -61,11 +61,11 @@ let taalo-build = pkgs.writeScriptBin "taalo-build" '' #!${pkgs.stdenv.shell} - if tmpdir="$("${pkgs.coreutils}/bin/mktemp" -d taalo-build.XXXXXX)"; then + if tmpdir="$("${pkgs.coreutils}/bin/mktemp" -d -t taalo-build.XXXXXX)"; then trap "rm -rf '$tmpdir'" EXIT drvs="$(nix-instantiate --add-root "$tmpdir/derivation" --indirect "$@" \ | cut -d'!' -f1)" || exit 1 - ${backend} $drvs + ${backend} $("${pkgs.coreutils}/bin/readlink" $drvs) exit $? else echo "Unable to create temporary directory for build link!" >&2 |