From 961a6c5ca9ceaa9c380c93029412a73fa6bf1be5 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 14 Oct 2024 20:11:48 +0200 Subject: [PATCH] Package uv --- repo/uv.ubpkg.sky | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 repo/uv.ubpkg.sky diff --git a/repo/uv.ubpkg.sky b/repo/uv.ubpkg.sky new file mode 100644 index 0000000..6f686f0 --- /dev/null +++ b/repo/uv.ubpkg.sky @@ -0,0 +1,20 @@ +gh = github_repo("astral-sh/uv") + +release = gh.latest_release() + +os_str = { + "linux": "unknown-linux-gnu", + "macos": "apple-darwin", + "windows": "pc-windows-msvc", +}[os] + +archive_format = { + "linux": "tar.gz", + "macos": "tar.gz", + "windows": "zip", +}[os] + +asset = release.get_asset_url("uv-{arch}-{os_str}.{archive_format}".format(arch=arch, os_str=os_str, archive_format=archive_format)) + +install_binary(extract_from_url(asset, "uv-{arch}-{os_str}/uv".format(arch=arch, os_str=os_str)), "uv") +install_binary(extract_from_url(asset, "uv-{arch}-{os_str}/uvx".format(arch=arch, os_str=os_str)), "uvx")