1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-25 02:10:54 +01:00

Remove Input::locked

This commit is contained in:
Eelco Dolstra 2022-08-10 16:47:36 +02:00
parent 4f8b253ea7
commit 90e9f50a66
7 changed files with 37 additions and 17 deletions

View file

@ -27,7 +27,6 @@ struct Input
std::shared_ptr<InputScheme> scheme; // note: can be null
Attrs attrs;
bool locked = false;
public:
static Input fromURL(const std::string & url);
@ -50,7 +49,7 @@ public:
/* Check whether this is a "locked" input, that is,
one that contains a commit hash or content hash. */
bool isLocked() const { return locked; }
bool isLocked() const;
/* Only for relative path flakes, i.e. 'path:./foo', returns the
relative path, i.e. './foo'. */
@ -140,6 +139,9 @@ struct InputScheme
virtual bool isDirect(const Input & input) const
{ return true; }
virtual bool isLocked(const Input & input) const
{ return false; }
virtual std::optional<CanonPath> isRelative(const Input & input) const
{ return std::nullopt; }