use alienfile;

# idiomatic way to make sure we always install/update?
probe [ q{ sh -c 'exit 127' } ];
 
share {
  start_url 'https://astral.sh/uv/install.sh';
  plugin 'Download';
  plugin 'Extract::File';

  build [
    [ q{ mkdir -p %{alien.runtime.prefix}/bin } ],

    # install direct to the sharedir for Alien::uv
    [ q{ INSTALLER_NO_MODIFY_PATH=1 UV_INSTALL_DIR=%{alien.runtime.prefix}/bin . %{alien.install.extract}/uv-installer.sh } ],

    # then copy back to blib so that .packlist gets files, and
    # allows use of File::ShareDir to locate binary cross-platform
    [ q{ cp -a %{alien.runtime.prefix}/bin %{alien.install.prefix}/ } ],
  ];
};

# vim: set ft=perl:
