about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-04-02T15·34+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-04-02T15·34+0000
commitc68dca5dac87f710c880bcf78710a7be9609d29c (patch)
treebf28cdd62da76bfc77bd562abfac4264edd79b0b
parent5bc26fb73fe997b05c2e43593d17de102c4249b7 (diff)
* Script to register pre-built packages.
-rwxr-xr-xsrc/nix-regprebuilts17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nix-regprebuilts b/src/nix-regprebuilts
new file mode 100755
index 000000000000..af643bf7e9ce
--- /dev/null
+++ b/src/nix-regprebuilts
@@ -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";
+}