This repository serves as the official package registry and build recipe collection for Basilisk (bsk), an immutable, zero-system-touch package manager designed exclusively for macOS.
Unlike legacy package managers that rely on restrictive custom DSLs or rigid Ruby formulae, Basilisk leverages the expressive power of Python via PyO3 integration. Every recipe defines how software should be downloaded, compiled, linked, and verified in an isolated, sandboxed environment.
Recipes are clean, declarative Python scripts. The Rust Core executes them inside an embedded Python interpreter and exposes a deterministic BuildContext API.
from basilisk import Recipe, BuildContext
class Nginx(Recipe):
name = "nginx"
version = "1.25.3"
source_url = "[https://nginx.org/download/nginx-1.25.3.tar.gz](https://nginx.org/download/nginx-1.25.3.tar.gz)"
sha256 = "a5369d2d2a4505f082e68407a16e53c44c6806543b56a90a6184568853b82142"
dependencies = [
"pcre2",
"openssl@3",
"zlib"
]
def build(self, ctx: BuildContext):
cmd = ctx.new_command("./configure")
# Enforce relative RPATH for Zero-System-Touch isolation
cmd.add_arg(f"--prefix={ctx.prefix}")
cmd.add_arg(f"--with-cc-opt=-I{ctx.deps['openssl@3'].include_dir}")
cmd.add_arg(f"--with-ld-opt=-L{ctx.deps['openssl@3'].lib_dir} -Wl,-rpath,@loader_path/../lib")
ctx.execute(cmd)
ctx.make(jobs=ctx.cpu_count)
ctx.make_install()