- Notifications
You must be signed in to change notification settings - Fork 739
Open
Labels
Description
New feature
Pixi is a package manager equivalent to Conda which is growing in popuarity recently.
Use case
Equivalent to Conda, Mamba, Spack, etc. We can use it to set environments per process using a Pixi TOML.
Suggested implementation
Here's a hacky version inspired by https://tiendu.github.io/2025/05/10/nextflow-pixi-eng.html. We could probably implement something similar inside a process.
main.nf:
process PIXI { debug true beforeScript ''' [ -d .pixi ] && [ -f pixi.lock ] || pixi install eval "$(pixi shell-hook)" ''' input: path pixi_lock output: stdout script: """ cowpy "hello pixi" """ } workflow { pixi_lock = Channel.fromPath("pixi.toml", checkIfExists: true) PIXI(pixi_lock) }pixi.toml
[project] name = "test-pixi-env" channels = ["conda-forge"] platforms = ["linux-64", "osx-arm64", "win-64"] [dependencies] cowpy = "1.1.*" python = "3.13.*"N E X T F L O W ~ version 25.04.1 Launching `./main.nf` [nauseous_hoover] DSL2 - revision: 8f2d7021a8 executor > local (1) [39/fcb524] PIXI (1) [100%] 1 of 1 ✔ ______________________________________________________ < Cowacter, eyes:default, tongue:False, thoughts:False > ------------------------------------------------------ \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||raymond-u and colinbrislawnewels, connor-french, colinbrislawn and qiyubio