dependencies:
  - name: brew
    check_running: false
    package_manager: true
    os_filter:
      - macos
    install_instructions: |
      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    description: Package manager for macOS
    website: https://brew.sh
    environments:
      macos:
        install_commands:
          - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
        verify_command: brew --version

  - name: java
    check_running: false
    min_version: 17
    install_instructions: |
      macOS: brew install openjdk
      Ubuntu/Debian: sudo apt-get install openjdk-17-jdk
      RHEL/CentOS: sudo yum install java-17-openjdk
      Or download from: https://openjdk.org/
    description: Java Runtime Environment version 17+ required for Nextflow
    website: https://openjdk.org/
    environments:
      google_colab:
        install_commands:
          - apt-get update -y
          - apt-get install -y openjdk-21-jdk-headless
        verify_command: java -version
      ubuntu:
        install_commands:
          - apt-get update -y
          - apt-get install -y default-jdk-headless
        verify_command: java -version
      macos:
        install_commands:
          - brew install openjdk
        verify_command: java -version
      arch:
        install_commands:
          - sudo pacman -Syu --noconfirm
          - sudo pacman -S --noconfirm jdk-openjdk
        verify_command: java -version
      windows:
        skip: true
        skip_reason: "Not required - Nextflow runs via Docker container on Windows"

  - name: docker
    check_running: true
    install_instructions: |
      Windows: winget install Docker.DockerDesktop --accept-source-agreements --accept-package-agreements
      macOS: brew install --cask docker
      Or download from https://www.docker.com/products/docker-desktop/
    description: Container runtime for running bioinformatics workflows
    website: https://www.docker.com
    environments:
      google_colab:
        skip: true
        skip_reason: "Docker is not supported in Google Colab. Nextflow will use local executor instead."
      ubuntu:
        install_commands:
          - apt-get update -y
          - apt-get install -y --reinstall docker.io
          - systemctl enable docker || true
          - systemctl start docker || true
        verify_command: docker --version
      macos:
        install_commands:
          - brew install --cask docker
        verify_command: docker --version
      arch:
        install_commands:
          - sudo pacman -Syu --noconfirm
          - sudo pacman -S --noconfirm docker
        verify_command: docker --version
      windows:
        install_commands:
          - winget install Docker.DockerDesktop --accept-source-agreements --accept-package-agreements
        verify_command: docker --version

  - name: nextflow
    check_running: false
    install_instructions: |
      Download from https://www.nextflow.io/
    description: Workflow management system for bioinformatics pipelines
    website: https://www.nextflow.io
    environments:
      google_colab:
        install_commands:
          - curl -s https://get.nextflow.io | bash
          - mv nextflow /usr/local/bin/
          - chmod +x /usr/local/bin/nextflow
        verify_command: nextflow -version
      ubuntu:
        install_commands:
          - curl -s https://get.nextflow.io | bash
          - sudo mv nextflow /usr/local/bin/
          - sudo chmod +x /usr/local/bin/nextflow
        verify_command: nextflow -version
      macos:
        install_commands:
          - brew install nextflow
        verify_command: nextflow -version
      arch:
        install_commands:
          - curl -s https://get.nextflow.io | bash
          - sudo mv nextflow /usr/local/bin/
          - sudo chmod +x /usr/local/bin/nextflow
        verify_command: nextflow -version
      windows:
        skip: true
        skip_reason: "Not required - runs via Docker container on Windows"

  - name: syftbox
    check_running: false
    install_instructions: |
      Install via curl: curl -fsSL https://syftbox.net/install.sh | sh
    description: An open-source network for privacy-first, offline-capable data science collaboration
    website: https://syftbox.net
    environments:
      google_colab:
        install_commands:
          - curl -fsSL https://syftbox.net/install.sh | sh -s -- --download-only
          - mv /root/.local/bin/syftbox /usr/local/bin/ 2>/dev/null || mv ~/.local/bin/syftbox /usr/local/bin/
          - chmod +x /usr/local/bin/syftbox
        verify_command: syftbox -v
      ubuntu:
        install_commands:
          - curl -fsSL https://syftbox.net/install.sh | sh -s -- --download-only
        verify_command: syftbox -v
      macos:
        install_commands:
          - curl -fsSL https://syftbox.net/install.sh | sh -s -- --download-only
        verify_command: syftbox -v
      arch:
        install_commands:
          - curl -fsSL https://syftbox.net/install.sh | sh -s -- --download-only
        verify_command: syftbox -v
      windows:
        skip: true
        skip_reason: "Manual install required. Download from https://github.com/OpenMined/syftbox/releases"

  - name: uv
    check_running: false
    install_instructions: |
      Install via curl: curl -LsSf https://astral.sh/uv/install.sh | sh
      Or via PowerShell: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
    description: Fast Python package installer and virtualenv manager
    website: https://astral.sh/uv
    environments:
      google_colab:
        install_commands:
          # Check if uv is already installed (real Colab has it pre-installed)
          - which uv || (curl -LsSf https://astral.sh/uv/install.sh | sh && mv $HOME/.cargo/bin/uv /usr/local/bin/uv 2>/dev/null || mv $HOME/.local/bin/uv /usr/local/bin/uv 2>/dev/null || true)
          - chmod +x /usr/local/bin/uv 2>/dev/null || true
        verify_command: uv --version
      ubuntu:
        install_commands:
          - curl -LsSf https://astral.sh/uv/install.sh | sh
          - export PATH="$HOME/.cargo/bin:$PATH"
        verify_command: uv --version
      macos:
        install_commands:
          - curl -LsSf https://astral.sh/uv/install.sh | sh
          - export PATH="$HOME/.cargo/bin:$PATH"
        verify_command: uv --version
      arch:
        install_commands:
          - curl -LsSf https://astral.sh/uv/install.sh | sh
          - export PATH="$HOME/.cargo/bin:$PATH"
        verify_command: uv --version
      windows:
        install_commands:
          - winget install --id=astral-sh.uv -e --silent --accept-package-agreements --accept-source-agreements
        # Check if UV can be found - this will fail initially, triggering installation
        verify_command: if (Get-Command uv -ErrorAction SilentlyContinue) { exit 0 } elseif (Test-Path "$env:LOCALAPPDATA\Programs\uv\uv.exe") { exit 0 } elseif (Test-Path "$env:LOCALAPPDATA\uv\bin\uv.exe") { exit 0 } elseif (Test-Path "$env:USERPROFILE\.cargo\bin\uv.exe") { exit 0 } else { exit 1 }
