Skip to content

Conversation

NotAShelf
Copy link
Collaborator

Relatively small PR that introduces several improvements to Nix packaging, CI workflows, and configuration files. The main themes I've targeted today are to update the CI workflows for better reliability (i.e., remove a hostile workflow that insists on installing its own enterprise crap) in favor of a fully free and reliable one as well as reducing redundancies in the Nix packaging.

We now add anyrun-provider (re-exported in packages) to Anyrun's PATH, and use a simple .override for anyrun-with-all-plugins package. This centralizes some packaging and installation steps.

I've also went ahead and updated the formatter package for nix fmt. The previously valid nix fmt . is now discouraged, and is suggested to be replaced with wrappers like treefmt. I find this to be obsolte, however, as we can handle this much faster in-house without relying on a 3rd party wrapper.

Lastly I've formatted TOML files with Taplo, which is a simple and reliable formatter. We can also set up rustfmt with a configuration file if desirable.

Signed-off-by: NotAShelf [email protected]
Change-Id: I6a6a6964e304a7ecf0a8b0516643e980a827224e

@NotAShelf NotAShelf force-pushed the notashelf/push-wppqqwxstpwn branch from 6ce3bd9 to 301a51d Compare September 29, 2025 10:33
Signed-off-by: NotAShelf <[email protected]>
Change-Id: I6a6a6964e304a7ecf0a8b0516643e980a827224e

ci: use cachix Nix installer

Signed-off-by: NotAShelf <[email protected]>
Change-Id: I6a6a6964db05f91668ef5c2d7f953f107084cf4b
Signed-off-by: NotAShelf <[email protected]>
Change-Id: I6a6a6964e259ee1a05f31319fdfd90a1c163404f
Signed-off-by: NotAShelf <[email protected]>
Change-Id: I6a6a6964a7d3d412c221bdf412bc241cad70610c
Signed-off-by: NotAShelf <[email protected]>
Change-Id: I6a6a69643aa993276a3cf38558001100ccefda1b
Signed-off-by: NotAShelf <[email protected]>
Change-Id: I6a6a69640bd938da0cb79a6e26310d121e72a53e
@NotAShelf NotAShelf force-pushed the notashelf/push-wppqqwxstpwn branch from 301a51d to f296278 Compare September 29, 2025 10:39
Copy link
Collaborator

@Kirottu Kirottu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be a whole lot of useful stuff, the HM module should be addressed but aside from that it should be good to go.

wrapProgram $out/bin/anyrun \
--set GDK_PIXBUF_MODULE_FILE "$(echo ${librsvg.out}/lib/gdk-pixbuf-2.0/*/loaders.cache)" \
--prefix ANYRUN_PLUGINS : $out/lib
--prefix PATH ":" ${lib.makeBinPath [ anyrun-provider ]} --prefix ANYRUN_PLUGINS ":" $out/lib
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the provider is added to PATH here, it should probably not be overridden in the config in the provided HM module.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the provider need to be specified in the configuration? If not, I'd like to remove it from the configuration.

I could maybe expose the provider used in the package as anyrun.passthru.anyrun-provider in case the user wants to access the it, but if we attempt to override the anyrun-provider in the argset via anyrun.override inside the HM module, we'll most likely cause binary cache misses- which would suck for the end user because of how long it takes to compile Rust... In the passthru method we can simply access the anyrun-provider used by the package, and always expect it to be exposed in passthru. This is mostly reliable, unless the user provides a very custom anyrun package that, e.g., does not have a passthru attribute but we can assert this case so it's fine.

Alternatively I can try to break packaging into two distinct variants as anyrun and anyrun-unwrapped, the latter not doing any wrapping and instead letting us do that in the HM module.

I'm more in favor of the first method, but let me know what you think.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't need to be a part of the config, as it will default to anyrun-provider, as in looking for it in PATH. I don't know enough about (proper) Nix packaging to really know how the provider should be linked to Anyrun proper though so I'll trust your judgement on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants