-
-
Notifications
You must be signed in to change notification settings - Fork 141
Description
Context
Flakes that are not of git
type doesn't support targeting a different ref than the default ref (default branch)
Problem
Flakes that are not of git
type and doesn't target the default ref (default branch) are forced to use the git
field and append "?ref=
" to their url
string value to specify their (non default) ref
Solution
For flakes, feature a new "ref
" field to specify for a non-default ref (different than the default branch)
Example
nixos-search/flakes/manual.toml
Lines 13 to 15 in 4e41fa5
[[sources]] | |
type = "git" | |
url = "git+https://github.com/hannesgith/rquickshare?ref=flake" |
With this solution, would become
[[sources]]
type = "github"
owner = "hannesgith"
repo = "rquickshare"
ref = "flake"
For more, see #996
References
nixos-search/flakes/manual.toml
Lines 13 to 15 in 4e41fa5
[[sources]] type = "git" url = "git+https://github.com/hannesgith/rquickshare?ref=flake" nixos-search/flakes/manual.toml
Lines 17 to 19 in 4e41fa5
[[sources]] type = "git" url = "git+https://github.com/hannesgith/neohtop?ref=nixify" nixos-search/flakes/manual.toml
Lines 21 to 23 in 4e41fa5
[[sources]] type = "git" url = "git+https://github.com/raboof/octopin?ref=nix" nixos-search/flakes/manual.toml
Lines 25 to 27 in 4e41fa5
[[sources]] type = "git" url = "git+https://github.com/TamtamHero/fw-fanctrl?ref=packaging/nix"