From 42c5774e78a9f1422dee9c35adb9c056aa994d3b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 4 Jul 2017 16:34:53 +0200 Subject: Sort substituters by priority Fixes #1438. --- src/libstore/store-api.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index c625a363033a..cada37653e6f 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -590,6 +590,11 @@ public: a notion of connection. Otherwise this is a no-op. */ virtual void connect() { }; + /* Get the priority of the store, used to order substituters. In + particular, binary caches can specify a priority field in their + "nix-cache-info" file. Lower value means higher priority. */ + virtual int getPriority() { return 0; } + protected: Stats stats; -- cgit 1.4.1