From 373d8b7b38df1f587052675a194b730da1f3703a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 7 Mar 2016 10:51:46 +0100 Subject: [PATCH] Fix NixOS 15.09 channel generation --- mirror-nixos-branch.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mirror-nixos-branch.pl b/mirror-nixos-branch.pl index 862205c..adf5977 100755 --- a/mirror-nixos-branch.pl +++ b/mirror-nixos-branch.pl @@ -50,8 +50,9 @@ my $rev = $evalInfo->{jobsetevalinputs}->{nixpkgs}->{revision} or die; print STDERR "release is ‘$releaseName’ (build $releaseId), eval is $evalId, dir is ‘$releaseDir’, Git commit is $rev\n"; # Guard against the channel going back in time. -my $curRelease = basename(readlink "$channelsDir/$channelName"); -if (defined $curRelease) { +my $curReleaseDir = readlink "$channelsDir/$channelName"; +if (defined $curReleaseDir) { + my $curRelease = basename($curReleaseDir); my $d = `nix-instantiate --eval -E "builtins.compareVersions (builtins.parseDrvName \\"$curRelease\\").version (builtins.parseDrvName \\"$releaseName\\").version"`; chomp $d; die "channel would go back in time from $curRelease to $releaseName, bailing out\n" if $d == 1;