-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sourceInfo
does not tell us whether it's git or not
#6747
Comments
It would be great to have |
I'd prefer to have it as structured data in such a way that it can be passed to |
Even including the type is not ideal, to ensure that building from I would prefer removing the |
Is your feature request related to a problem? Please describe.
We'd like to set the configuration revision in NixOS to "dirty" when the repo is dirty, but we have to infer from
sourceInfo?submodules
whether it's git or not.Describe the solution you'd like
An explicit identification of what type the source is. Perhaps not in the
type
or_type
attr, because those can not represent subtyping hierarchies. A git sourceInfo is a sourceInfo, so tagging it only astype = "git"
makes checking forsourceInfo
hard.A marker like
isGit = true
would be a better design, except I wouldn't want aisGit = false
on all non-git sourceInfos. Perhaps an encoding likesourceInfo.git = { rev, ... }
with all the git-related attrs inside would be best?Describe alternatives you've considered
Hope that the
submodules
attribute remains an accurate signifier of git-ness.Additional context
The text was updated successfully, but these errors were encountered: