Skip to content

Support for Pixi #6092

@adamrtalbot

Description

@adamrtalbot

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 |  || ||

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions