From 0d913f7656cbb72d46e2acb41817b2394c056248 Mon Sep 17 00:00:00 2001 From: "Waylon S. Walker" Date: Thu, 10 Apr 2025 20:08:34 -0500 Subject: [PATCH] brew is gonna take some work --- krayt/package.py | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/krayt/package.py b/krayt/package.py index 26f2a86..2e78ab1 100644 --- a/krayt/package.py +++ b/krayt/package.py @@ -11,7 +11,6 @@ SUPPORTED_KINDS = { "i", "curlbash", "curlsh", - "brew", "cargo", "pipx", "npm", @@ -31,7 +30,7 @@ def validate_kind(v): class Package(BaseModel): """ Represents a package to be installed, either via system package manager - or an alternative installer like uv, installer.sh, brew, etc. + or an alternative installer like uv, installer.sh, etc. """ kind: Annotated[ @@ -41,7 +40,6 @@ class Package(BaseModel): "i", "curlsh", "curlbash", - "brew", "cargo", "pipx", "npm", @@ -74,22 +72,6 @@ class Package(BaseModel): if self.kind in ["uv", "i", "installer", "curlbash", "curlsh", "gh"]: dependencies.append(Package.from_raw("curl")) - if self.kind == "brew": - dependencies.append(Package.from_raw("git")) - dependencies.append(Package.from_raw("curl")) - self.pre_install_hook = "NONINTERACTIVE=1" - self.post_install_hook = """ -# Setup Homebrew PATH -if [ -f /home/linuxbrew/.linuxbrew/bin/brew ]; then - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" -elif [ -f /opt/homebrew/bin/brew ]; then - eval "$(/opt/homebrew/.linuxbrew/bin/brew shellenv)" -elif [ -f /usr/local/bin/brew ]; then - eval "$(/usr/local/bin/brew shellenv)" -else - echo "⚠️ Brew installed but binary location unknown." -fi -""" if self.kind == "cargo": dependencies.append(Package.from_raw("cargo")) if self.kind == "pipx": @@ -120,8 +102,6 @@ fi cmd = f"curl -fsSL {self.value} | sh" elif self.kind == "curlbash": cmd = f"curl -fsSL {self.value} | bash" - elif self.kind == "brew": - cmd = "curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash" elif self.kind == "cargo": cmd = f"cargo install {self.value}" elif self.kind == "pipx": @@ -147,7 +127,6 @@ if __name__ == "__main__": "uv:copier", "i:sharkdp/fd", "curlsh:https://example.com/install.sh", - "brew:bat", ] packages = [Package.from_raw(raw) for raw in raw_inputs]