about summary refs log blame commit diff
path: root/src/nix-regprebuilts
blob: af643bf7e9ce68259c4db76724dbc3e738f6c38d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                    
#! /usr/bin/perl -w

my $dir = $ENV{"NIX"} . "/prebuilts";

foreach my $prebuilt (glob("$dir/*.tar.bz2")) {

    $prebuilt =~ /-([a-z0-9]+)-([a-z0-9]+).tar.bz2$/
	|| die "invalid file name: $prebuilt";

    my $pkgHash = $1;
    my $prebuiltHash = $2;

    print "$pkgHash -> $prebuiltHash\n";

    system "nix regprebuilt $pkgHash $prebuiltHash";
    system "nix regfile $prebuilt";
}