-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nix-prefetch-git: Include the date in the machine-readable output on
stdout, in strict ISO 8601 format. This will be helpful for automatically updating fetchgit expressions and the dates in version numbers associated with them.
- Loading branch information
1 parent
77ea161
commit f56ab9e
Showing
1 changed file
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f56ab9e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is kind of obnoxious because it causes the format of nix-prefetch-git to deviate from the format of fetchgit, so you can't just plug the one into the other with a
builtins.parseJSON
anymore. I'm thinking about issuing a PR to take it back out or else to make thefetchgit
in nixpkgs accept (but ignore) extra arguments...f56ab9e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a short term fix you could extend
fetchgit
to accept an optionaldate
argument. This could also be used to set the version part in thename=${pname}-${version}
attribute if none is provided.Longer term it might make sense for all fetchers to accept an optional
meta
attribute that we can use to stuff that kind of meta-data, and which would be re-exported on the derivation.f56ab9e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand, it seems like only one of those can be the "active" solution to this problem at a time: for
fetchgit
in particular, eitherdate
is read and used to inform the version or elsedate
moves to this newmeta
object and does not inform the version. If that is correct, I think it would be a better idea to implement themeta
field in all fetchers, as described, as an unrelated feature to this issue. This issue would then be solved (in the long term) by recognizing thedate
field infetchgit
so that we get the desirable version-effecting property.