NixOS/hydra — pull request #180 by aszlig (2014-08-28 21:36:02+00:00)
Title: Use mktemp for tempdir creation in prefetchers.

This incorporates the following two commits from [\](/NixOS/nixpkgs):

NixOS/nixpkgs@f83af95f8a54d0375ac6e159b663de887ba5b6a6
NixOS/nixpkgs@5e7a1cf955e43e1fa3c1c157c0d6961e1bcf9801

Hydra was the original reason why I was fixing tempdir creation in the first place. Seeing that Hydra ships its own versions of these scripts, we need to patch them here as well.

Recently had a collision again:

```sh
$ journalctl --since=2014-08-27 --until=2014-08-28 _SYSTEMD_UNIT=hydra-evaluator.service \
| grep -F /tmp/git-checkout | cut -d: -f4- | sort | uniq -dc | sort -n
2 Initialized empty Git repository in /tmp/git-checkout-tmp-19972/git-export/.git/
2 Initialized empty Git repository in /tmp/git-checkout-tmp-3895/git-export/.git/
$
```