mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
* Script to register pre-built packages.
This commit is contained in:
parent
5bc26fb73f
commit
c68dca5dac
1 changed files with 17 additions and 0 deletions
17
src/nix-regprebuilts
Executable file
17
src/nix-regprebuilts
Executable file
|
@ -0,0 +1,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";
|
||||
}
|
Loading…
Reference in a new issue