Nixpkgs-update-notifier: subscribe to nixpkgs-update build errors

Hey everyone, inspired by @maralorn’s excellent bot, I’ve been working on a similar tool, that would allow me to subscribe to build failures of the nixpkgs-update tool.

You can find the bot at @nixpkgs-update-notify-bot:matrix.org (link), and the repo over here.

It periodicallyatm every 1hr fetches logs from https://github.com/nix-community/nixpkgs-update, notifying subscribers of any failure. It doesn’t have access to the builder’s exit code, so it has to resort to some dumb regex matching on the logs. I think if this proves to be useful, it could be cool to integrate it into the nixpkgs-update infrastructure, so it wouldn’t have to do that (and could develop other capabilities, e.g. a last_success command)

Please let me knowhere or by filing an issue if you encounter any problems.


UPDATE: The bot does not currently handle E2EE messaging (didn’t seem useful for such a bot), so if you send it encrypted messages it will not answer. This means the bot currently doesn’t work if you message it from Element X, whereas it does from Element.

UPDATE2: Current workaround is to add the bot to a public, unencrypted room.

14 Likes

I might be missing something obvious; is there a public instance of the bot anywhere currently, or is it in a “host-it-yourself” state?

1 Like

Oops sorry, forgot to post the link to the bot.

Fixed in the OP – thanks :slight_smile:

1 Like

i would love the option for per-maintainer rss feeds, or a static report of all packages whose most recent attempt was a failure, kinda like nix-review-tools does for hydra

5 Likes

This, or being able to subscribe to multiple packages in a single message, would be really nice. As it is, I’d have to send a lot of messages to subscribe to all the packages I maintain

1 Like

you can list the packages of a maintainer like so:

curl 'https://releases.nixos.org/nixos/unstable/nixos-24.11pre684053.9357f4f23713/packages.json.br' | brotli -dc  | jq '.packages|to_entries[]|select(.value.meta.maintainers[]?|.github|index("pbsds"))|.key'

package.json can be made using

nix-env --extra-experimental-features no-url-literals --option system x86_64-linux -f ./. -qaP --json --meta  --no-allow-import-from-derivation > packages.json
3 Likes

Could you add a subscription to packages by regex?

My use case is that I want to be notified if one of vimPlugins.* will fail (I like to maintain them, but I don’t want to explicitly specify myself as a maintainer of 3000+ packages)

Anyway, great work!

1 Like

Some way of subscribing to multiple packages at once is definitely planned, but I’m not sure about the regex approach.

The main reason is that, exactly as you bring up, people could subsribe to thousands of packages (potentially all packages nixpkgs-update knows about, ~56000), which would put a lot of stress on the nix-community.org server.

There’s also the issue of accepting untrusted regexes, and I’d have to make sure there are not vulnerabilities there.

All in all, I’m much more likely to implement a hard-coded way of subscribing to e.g. the same package under multiple Python versions, than something like all vim plugins – sorry!

1 Like

Then, would it be possible to implement a way to subscribe to a package set? You can check if a package set is too big (e.g. python312Packages)

The same as it is implemented on search.nixos.org:
image