1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-16 05:51:05 +01:00

Add path flakeref variant

Unlike file://<path>, this allows the path to be a dirty Git tree, so

  nix build /path/to/flake:attr

is a convenient way to test building a local flake.
This commit is contained in:
Eelco Dolstra 2019-04-08 22:46:25 +02:00
parent a9ceeeb4b0
commit 6a4c7fb975
6 changed files with 49 additions and 5 deletions

View file

@ -122,9 +122,14 @@ struct FlakeRef
std::optional<Hash> rev;
};
struct IsPath
{
Path path;
};
// Git, Tarball
std::variant<IsFlakeId, IsGitHub, IsGit> data;
std::variant<IsFlakeId, IsGitHub, IsGit, IsPath> data;
// Parse a flake URI.
FlakeRef(const std::string & uri);