1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-24 01:41:08 +01:00

Remove Input::direct

This commit is contained in:
Eelco Dolstra 2022-08-10 16:39:25 +02:00
parent dd1dac0f78
commit 4f8b253ea7
3 changed files with 13 additions and 4 deletions

View file

@ -28,7 +28,6 @@ struct Input
std::shared_ptr<InputScheme> scheme; // note: can be null
Attrs attrs;
bool locked = false;
bool direct = true;
public:
static Input fromURL(const std::string & url);
@ -47,7 +46,7 @@ public:
/* Check whether this is a "direct" input, that is, not
one that goes through a registry. */
bool isDirect() const { return direct; }
bool isDirect() const;
/* Check whether this is a "locked" input, that is,
one that contains a commit hash or content hash. */
@ -138,6 +137,9 @@ struct InputScheme
virtual std::pair<ref<InputAccessor>, Input> getAccessor(ref<Store> store, const Input & input) const = 0;
virtual bool isDirect(const Input & input) const
{ return true; }
virtual std::optional<CanonPath> isRelative(const Input & input) const
{ return std::nullopt; }