nextflow-io/nextflow

Support for Pixi

Open

#6.092 aberto em 16 de mai. de 2025

Ver no GitHub
 (3 comments) (17 reactions) (0 assignees)Groovy (784 forks)batch import
good first issuestale

Métricas do repositório

Stars
 (3.382 stars)
Métricas de merge de PR
 (Mesclagem média 3d 18h) (38 fundiu PRs em 30d)

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

Guia do colaborador