mirror of
https://github.com/NixOS/nix.git
synced 2025-12-19 07:21:07 +01:00
Make 'nix edit' etc. work again
This commit is contained in:
parent
1790698a74
commit
bb4d35dcca
15 changed files with 108 additions and 82 deletions
|
|
@ -54,7 +54,9 @@ public:
|
|||
one that contains a commit hash or content hash. */
|
||||
bool isLocked() const { return locked; }
|
||||
|
||||
bool isRelative() const;
|
||||
/* Only for relative path flakes, i.e. 'path:./foo', returns the
|
||||
relative path, i.e. './foo'. */
|
||||
std::optional<CanonPath> isRelative() const;
|
||||
|
||||
bool hasAllInfo() const;
|
||||
|
||||
|
|
@ -77,8 +79,6 @@ public:
|
|||
|
||||
void clone(const Path & destDir) const;
|
||||
|
||||
std::optional<Path> getSourcePath() const;
|
||||
|
||||
void markChangedFile(
|
||||
std::string_view file,
|
||||
std::optional<std::string> commitMsg) const;
|
||||
|
|
@ -130,8 +130,6 @@ struct InputScheme
|
|||
|
||||
virtual void clone(const Input & input, const Path & destDir);
|
||||
|
||||
virtual std::optional<Path> getSourcePath(const Input & input);
|
||||
|
||||
virtual void markChangedFile(const Input & input, std::string_view file, std::optional<std::string> commitMsg);
|
||||
|
||||
/* Note: the default implementations of fetchToStore() and
|
||||
|
|
@ -142,8 +140,8 @@ struct InputScheme
|
|||
|
||||
virtual std::pair<ref<InputAccessor>, Input> getAccessor(ref<Store> store, const Input & input);
|
||||
|
||||
virtual bool isRelative(const Input & input) const
|
||||
{ return false; }
|
||||
virtual std::optional<CanonPath> isRelative(const Input & input) const
|
||||
{ return std::nullopt; }
|
||||
|
||||
virtual std::optional<std::string> getFingerprint(ref<Store> store, const Input & input) const
|
||||
{ return std::nullopt; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue