nox icon indicating copy to clipboard operation
nox copied to clipboard

Pixi / py-rattler support

Open lucascolley opened this issue 5 months ago • 4 comments

It would be cool for nox to have support for Pixi, in a similar vein to its support to uv.

This isn't a full proposal, just thought I would open an issue while it is on my mind. @henryiii maybe you have thought about this already?

lucascolley avatar Jul 21 '25 14:07 lucascolley

Yes, I even was talking to @ruben-arts and @wolfv about this at SciPy less than two weeks ago. What we need is a low level interface which currently doesn't (exactly[^1]) exist. It sounds like it might, soon, though.

There's also the idea that we would have a higher-level "environment" model in the future, and that could support locked/external environments, which could integrate with the high level interfaces of pixi (and uv, poetry, etc). That's something I've got ideas for but no time for quite a while.

[^1]: I think there's a way to do it with rattler, but we are talking about the single binary pixi. :)

henryiii avatar Jul 21 '25 15:07 henryiii

I think there's a way to do it with rattler

I guess you are alluding to something like https://github.com/airspeed-velocity/asv/pull/1445 ?

lucascolley avatar Jul 21 '25 16:07 lucascolley

Yes, pretty sure that's it (py-rattler). Since we now support adding requirements, we could add support for it separately from supporting pixi.

henryiii avatar Jul 21 '25 16:07 henryiii

Hi @lucascolley @henryiii 😊 I just stumbled on this since I was wondering if nox can do this 😄

Do you know if there have been any updates to pixi which could enable this?

I also thought about it a bit and I guess the current "as is" solution would be to create a one-to-one feature-environment combination for each venv. The pixi.toml could be placed in .nox or example.

So something along the lines of

pixi init --format pixi .nox

pixi add --manifest-path .nox --feature <VENV_NAME> <REQUIREMENTS> #optional --pypi?

pixi workspace environment add --manifest-path .nox --feature <VENV_NAME>  <VENV_NAME> 

pixi run --manifest-path .nox --environment <VENV_NAME>  <TASK>

Feels kind of clumsy though 😄 But this could also expose the other feature fields. Let me know what you think, I am not super sure about this since I haven't used nox and just recently started using pixi.

StFroese avatar Nov 28 '25 09:11 StFroese