nextflow-io/nextflow

Support for Pixi

Open

#6092 aperta il 16 mag 2025

Vedi su GitHub
 (3 commenti) (17 reazioni) (0 assegnatari)Groovy (784 fork)batch import
good first issuestale

Metriche repository

Star
 (3382 star)
Metriche merge PR
 (Merge medio 3g 18h) (38 PR mergiate in 30 g)

Descrizione

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

Guida contributor