mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Add priority setting to stores
This allows overriding the priority of substituters, e.g. $ nix-store --store ~/my-nix/ -r /nix/store/df3m4da96d84ljzxx4mygfshm1p0r2n3-geeqie-1.4 \ --substituters 'http://cache.nixos.org?priority=100 daemon?priority=10' Fixes #3264.
This commit is contained in:
parent
54bf5ba422
commit
f8abbdd456
13 changed files with 51 additions and 47 deletions
|
@ -52,11 +52,6 @@ public:
|
|||
|
||||
std::shared_ptr<std::string> getFile(const std::string & path);
|
||||
|
||||
protected:
|
||||
|
||||
bool wantMassQuery_ = false;
|
||||
int priority = 50;
|
||||
|
||||
public:
|
||||
|
||||
virtual void init();
|
||||
|
@ -79,8 +74,6 @@ public:
|
|||
std::optional<StorePath> queryPathFromHashPart(const std::string & hashPart) override
|
||||
{ unsupported("queryPathFromHashPart"); }
|
||||
|
||||
bool wantMassQuery() override { return wantMassQuery_; }
|
||||
|
||||
void addToStore(const ValidPathInfo & info, const ref<std::string> & nar,
|
||||
RepairFlag repair, CheckSigsFlag checkSigs,
|
||||
std::shared_ptr<FSAccessor> accessor) override;
|
||||
|
@ -107,8 +100,6 @@ public:
|
|||
|
||||
std::shared_ptr<std::string> getBuildLog(const StorePath & path) override;
|
||||
|
||||
int getPriority() override { return priority; }
|
||||
|
||||
};
|
||||
|
||||
MakeError(NoSuchBinaryCacheFile, Error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue