name: 'Download dependencies'
description: 'Nixpkgs and uv'
inputs:
  full-deps:
    description: 'Pass --arg fullDeps true to nix-shell?'
    required: false
    default: false
runs:
  using: "composite"
  steps:
    - name: Install nix
      uses: cachix/install-nix-action@v31
      with:
        nix_path: nixpkgs=channel:nixos-unstable
    - name: Dependencies nixpkgs
      run: timeout -v --kill-after=10 500 nix-shell --arg fullDeps "${{ inputs.full-deps }}" --run "echo nixpkgs deps preinstalled" || echo "NIXPKGS PREINSTALL FAILURE"
      shell: sh
    - name: Dependencies uv
      run: timeout -v --kill-after=10 200 nix-shell --arg fullDeps "${{ inputs.full-deps }}" --run "uv sync"
      shell: sh
