fetchFromGit{Hub,Lab}: add meta.changelog#144141
fetchFromGit{Hub,Lab}: add meta.changelog#144141Synthetica9 wants to merge 3 commits intoNixOS:masterfrom
Conversation
ff9da16 to
58bd1e4
Compare
Script used: ag -l --nix \ | xargs grep --files-with-match "inherit (src.meta) homepage" \ | xargs grep --files-with-match --perl-regexp 'version = "[0-9\.]+"' \ | xargs grep --files-with-match --perl-regexp "fetchFromGit(Hub|Lab)" \ | xargs grep --files-without-match changelog \ | xargs sed -i "s/inherit (src.meta) homepage;/inherit (src.meta) homepage changelog;
58bd1e4 to
b5bc1fa
Compare
|
Please, consider documenting the |
|
I usually rely on the plain URL being around in meta to quickly navigate to the project home or its changelog when editing or reviewing a package. While inheriting these values from the fetchers is a neat trick it does not improve the developer experience in my opinion. |
I second this. I used to like the quick and convenience of |
|
It's ok for the fetcher to add this to its meta, but packages should provide their own changelog, because often enough, the github releases page is not the best changelog. For instance nix should have https://nixos.org/manual/nix/stable/release-notes/release-notes.html (which is an empty "header" page that should be fixed but that's beside the point) |
That would encourage people to add more occurrences of this which I am against. As hexa- already wrote using inherit is pretty bad for the review experience and copying URLs together is just annoying. If I have a direct link to the source I usually do more research myself to give better review comments. If there is no such link I put the extra work on the contributor. |
This adds a changelog to packages that previously didn't have one, so while I guess that some packages do indeed have a better changelog somewhere, this isn't listed in
Changelog are usually version-specific, and thus not clickable even when they do specify a "full" url in the derivation due to interpolation with 75%+ of "changelog =" entries are not clickable currently. I agree that it would be nice to have a cleaner way to open (derived) urls in a package. |
|
Fair enough regarding the changelog. I agree this solution is elegant when changelogs are provided through GitHub releases. I just think we need to roll this back for the homepage, and maybe clarify homepage vs source repository. |
it's way easier to click and then fix the link or just go to releases than |
|
Changelog URLs computed from a version are also a problem because a PR may need multiple such pages to be reviewed and it's easy to forget about those other pages. |
| meta = with lib; { | ||
| description = "Lightweight GTK Clipboard Manager"; | ||
| inherit (src.meta) homepage; | ||
| inherit (src.meta) homepage changelog; |
There was a problem hiding this comment.
There was a problem hiding this comment.
we should just be fetching from the tag here
|
|
||
| meta = with lib; { | ||
| inherit (src.meta) homepage; | ||
| inherit (src.meta) homepage changelog; |
There was a problem hiding this comment.
| passthru.updateScript = import ./update.nix { | ||
| inherit lib; | ||
| inherit (src.meta) homepage; | ||
| inherit (src.meta) homepage changelog; |
There was a problem hiding this comment.
Not sure the update script needs the changelog.
| passthru.updateScript = import ./update.nix { | ||
| inherit lib; | ||
| inherit (src.meta) homepage; | ||
| inherit (src.meta) homepage changelog; |
There was a problem hiding this comment.
Not sure this update script needs the changelog either.
There was a problem hiding this comment.
Ah no, it doesn't 😅
| Both GLX and EGL are supported, in any combination with OpenGL and OpenGL ES. | ||
| ''; | ||
| inherit (src.meta) homepage; | ||
| inherit (src.meta) homepage changelog; |
There was a problem hiding this comment.
| documentation for filesystem encryption before using fscryptctl. | ||
| ''; | ||
| inherit (src.meta) homepage; | ||
| inherit (src.meta) homepage changelog; |
There was a problem hiding this comment.
There was a problem hiding this comment.
There was a problem hiding this comment.
nix-repl> pkgs.fscryptctl.meta.changelog
"https://github.com/google/fscryptctl/releases/tag/v{version}"
There was a problem hiding this comment.
wait no, wtf is happening here
There was a problem hiding this comment.
Also this package should be dropped accoding to the comment?
There was a problem hiding this comment.
Oops, right, that package (fscryptctl-experimental) should be dropped (I forgot to include my GH handle in the TODO which I use to find them) and it seems like I forgot the $ in the fscryptctl package. I've opened #144885 if that helps. You can also include it in this PR if you want.
| license = licenses.gpl2; | ||
| platforms = platforms.linux; | ||
| inherit (src.meta) homepage; | ||
| inherit (src.meta) homepage changelog; |
There was a problem hiding this comment.
There was a problem hiding this comment.
Ah the version here should be changed to -unstable
|
Yeah, we can't rely on all tags having releases https://gitlab.freedesktop.org/glvnd/libglvnd/-/releases/v1.3.2 is the latest tag with a release Also I guess adding this as default to all sources means even if we manually set the changelog in the package meta, maybe to a Maybe it should be called release or releasePage? but then it'd be |
Motivation for this change
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)