guix/src/nix-activate

23 lines
399 B
Perl
Executable File

#! /usr/bin/perl -w
use strict;
my $pkglist = "/home/eelco/.nixactivations";
if (!-f $pkglist) {
system "touch $pkglist";
}
my $hash;
foreach $hash (@ARGV) {
system "grep -q $hash $pkglist";
if ($?) {
print STDERR "activating $hash\n";
system "nix getpkg $hash > /dev/null";
if ($?) { die "`nix getpkg' failed"; }
system "echo $hash >> $pkglist";
}
}
system "nix-populate";