about summary refs log tree commit diff
path: root/scripts/nix-push-prebuilts
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-10T15·11+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-10T15·11+0000
commit1d1c3691d2fdf5aad0baceadd8596f23c1e0e1fa (patch)
treec89123e33796e3408b613e1a824bcc66ad30395e /scripts/nix-push-prebuilts
parentd072485d2895d01dbbab1d899418726e3349343f (diff)
* The policy-free derivate sharing now *almost* works. :-) For any
  hash for which no local expansion is available, Nix can execute a
  `substitute' which should produce a path with such a hash.

  This is policy-free since Nix does not in any way specify how the
  substitute should work, i.e., it's an arbitrary (unnormalised)
  fstate expression.  For example, `nix-pull' registers substitutes
  that fetch Nix archives from the network (through `wget') and unpack
  them, but any other method is possible as well.  This is an
  improvement over the old Nix sharing scheme, which had a policy
  (fetching through `wget') built in.

  The sharing scheme doesn't work completely yet because successors
  from fstate rewriting have to be registered on the receiving side.
  Probably the whole successor stuff can be folded up into the
  substitute mechanism; this would be a nice simplification.

Diffstat (limited to 'scripts/nix-push-prebuilts')
-rwxr-xr-xscripts/nix-push-prebuilts44
1 files changed, 0 insertions, 44 deletions
diff --git a/scripts/nix-push-prebuilts b/scripts/nix-push-prebuilts
deleted file mode 100755
index 2d44e7cda06d..000000000000
--- a/scripts/nix-push-prebuilts
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /usr/bin/perl -w
-
-my $prefix = $ENV{"NIX"} || "/nix"; # !!! use prefix
-my $etcdir = "$prefix/etc/nix";
-my $exportdir = "$prefix/var/nix/prebuilts/exports";
-my $knowns = "$prefix/var/nix/known-prebuilts";
-
-umask 0022;
-
-# For performance, put the known hashes in an associative array.
-my %knowns = ();
-open KNOWNS, "<$knowns";
-while (<KNOWNS>) {
-    next unless /([0-9a-z]{32})/;
-    $knowns{$1} = 1;
-}
-close KNOWNS;
-
-# For each installed package, check whether a prebuilt is known.
-
-open PKGS, "nix listinst|";
-
-while (<PKGS>) {
-    chomp;
-    next unless /([0-9a-z]{32})/;
-    my $pkghash = $1;
-    if (!defined $knowns{$1}) {
-        # No known prebuilt exists for this package; so export it.
-        print "exporting $pkghash...\n";
-        system "nix export '$exportdir' $pkghash";
-        if ($?) { die "`nix export' failed"; }
-    }
-}
-
-close PKGS;
-
-# Push the prebuilts to the server. !!! FIXME
-
-system "rsync -av -e ssh '$exportdir'/ eelco\@losser.st-lab.cs.uu.nl:/home/eelco/public_html/nix-prebuilts/";
-
-# Rerun `nix-pull-prebuilts' to rescan the prebuilt source locations.
-
-print "running nix-pull-prebuilts...";
-system "nix-pull-prebuilts";