use NIX_*_DIR env vars when defined

This commit is contained in:
Rob Vermaas
2011-03-16 13:08:12 +00:00
parent d5710b840b
commit 8f35d03bca
3 changed files with 7 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ sub scmPath {
sub getBuildLog {
my ($drvPath) = @_;
my $logPath = "/nix/var/log/nix/drvs/" . basename $drvPath;
my $logPath = ($ENV{NIX_LOG_DIR} || "/nix/var/log/nix"). "/drvs/" . basename $drvPath;
return -e $logPath ? $logPath : undef;
}