-
Notifications
You must be signed in to change notification settings - Fork 10
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
Include git-version and git-date #8
Comments
|
It is 100% consequential what the name and version of the thunk are, and if The programs I am using do include user-readable version information with branch / tag-relative number of commits as critical debugging / deployment tools. If I can't have that, then my users' debug logs are much less useful. Right now, my packages use the following information:
My nix recipes know how to use that information to include suitable reflection information in logs so reported bugs are reproducible (reproducibility, have you heard of this idea?). Admittedly, extracting the fallback behavior of If this information were available, my overrides could be 100% identical to those pushed to |
Good points! I'm not suggesting your idea is bad. In fact I have wanted this too! My only point is that nix-thunk would need to provide this at the Nix level in such a way that you can't detect the difference between packed or unpacked. In the case of unpacked, it's also reasonable to assume that the source tree might be dirty in which has the git hash isn't fully reproducible. We'd need the hash of the source tree...but nix already gives us that. |
So as to give accurate
--git-version
information andunstable-${date}
nix version information, please include in thegithub.json
the output ofgit describe --tags --always
and the date of the last commit inYYYY-MM-DD
format. This way, my overrides can have the exact same content as if/when they are merged into nixpkgs.Note that
git describe --tags --always
can be slightly tricky to emulate without downloading an entire checkout, but I have some code in Scheme to do about the same if you know the tag you're based off of and then use some gitlab URL to get the count of commits... ugly, but works on gitlab (and something similar works on github). Still cheaper than cloning an unshallow checkout.The text was updated successfully, but these errors were encountered: