2T42QGZDK23C5V4ZHO4R7EBJESIQ62GKWDBWVX7OBEE3YVBUNUFAC
IN272KZWHENW2TCR3LWQ6OZAEESJL5S7AEL3GYLJTWHJUDE6HADAC
AFTXA575C6JTVLVXTYJUKQGPLBO3NFORLO5XDSPHNL44HXLRH4TAC
WZ3AEJ67LOG5L335AAC2BDLIJPIU4VSCGBMATBHDZC26ECRS5A6AC
2GK5DOU7ODF4WBSN3QTD3WIO52VTL2LOAXKGCDEMMAQPTEO4A4HAC
BD3GRK4BQUGRQGTAILUITIH3RRSVUH6AKINVMMKYLBAAHAAUSB4AC
7YBYT2LQML2PKEO6UO4444AGSASS664UCDXW2YO3ALB7THQHCEBQC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
4X6NS66QDWR4S4ZZFKN2QOJQII5ZYIMTDYRHK25N6NJSROVLHJ6QC
}
sub getGCRootsDir {
die unless defined $ENV{LOGNAME};
return "/nix/var/nix/gcroots/per-user/$ENV{LOGNAME}/hydra-roots";
}
sub registerRoot {
my ($path) = @_;
my $gcRootsDir = getGCRootsDir;
mkpath($gcRootsDir) if !-e $gcRootsDir;
my $link = "$gcRootsDir/" . basename $path;
if (!-l $link) {
symlink($path, $link)
or die "cannot create symlink in $gcRootsDir to $path";
}
#print "$path\n";
mkpath($gcRootsDir) if !-e $gcRootsDir;
my $link = "$gcRootsDir/" . basename $path;
if (!-l $link) {
symlink($path, $link)
or die "cannot create symlink in $gcRootsDir to $path";
}
Hydra::Helper::Nix::registerRoot($path);