We needed another of these, right?
I was exploring using the update.nix approach for helping automate checking for github releases,
and here's what I came up with. It can certainly be improved but I like it so thought I'd share :).
So there are a number of quirks:
--option tarball-ttl 0)It seems to work surprisingly well considering I'm mostly just pointing Nix at GitHub's API :grin:.
cc https://github.com/NixOS/nixpkgs/pull/21734
Updates when script is executed, still mostly nix
This looks great, though I would love if it were little more composable:
updateScript but not fetchFromGitHub, for example, when there is a release tarball.https://gitlab.gnome.org/api/v4/projects/GNOME%2Fpolari/repository/tags.updateScript could take arbitrary version resolution function.There are some corner-cases even on GitHub:
extensions.gnome.org-v, the other uses no prefix.PROJECT_NAME_MAJOR_MINOR_PATCH format for tags, https://github.com/GNOME/libgdata/releases, some project might do that still.I have been experimenting with auto-updaters every now and then (https://github.com/dezgeg/nixpkgs/blob/a44210758527fe1f8bdad13b58b3ada209470298/pkgs/common-updater/scripts/list-upstream-versions for my attempts).
In retrospect, writing all of this in shell was a horrible idea. But my overall idea is that the updaters should have 'phases' just like the Nixpkgs stdenv has, with sensible defaults/heuristics for the phases (just like stdenvs by default assumes the package is built in a autoconf-compatible way).
I've thought of (at least) the following separate phases:
Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:
Most helpful comment
I have been experimenting with auto-updaters every now and then (https://github.com/dezgeg/nixpkgs/blob/a44210758527fe1f8bdad13b58b3ada209470298/pkgs/common-updater/scripts/list-upstream-versions for my attempts).
In retrospect, writing all of this in shell was a horrible idea. But my overall idea is that the updaters should have 'phases' just like the Nixpkgs stdenv has, with sensible defaults/heuristics for the phases (just like stdenvs by default assumes the package is built in a autoconf-compatible way).
I've thought of (at least) the following separate phases: