Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/Package/Artifact/go_win.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@

class go_win
{
/** GOROOT for the Windows Go toolchain. */
public static function path(): string
{
return PKG_ROOT_PATH . '/go-win';
}

/** Path to a binary inside go-win's bin/ (go.exe, gofmt.exe, …). */
public static function binary(string $name = 'go.exe'): string
{
return self::path() . '/bin/' . $name;
}

public static function isInstalled(): bool
{
return is_file(self::binary());
}

#[CustomBinary('go-win', [
'windows-x86_64',
])]
Expand Down
17 changes: 17 additions & 0 deletions src/Package/Artifact/go_xcaddy.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@

class go_xcaddy
{
/** GOROOT for the bundled Go toolchain used to build xcaddy. */
public static function path(): string
{
return PKG_ROOT_PATH . '/go-xcaddy';
}

/** Path to a binary inside go-xcaddy's bin/ (xcaddy, go, …). */
public static function binary(string $name = 'xcaddy'): string
{
return self::path() . '/bin/' . $name;
}

public static function isInstalled(): bool
{
return is_file(self::binary());
}

#[CustomBinary('go-xcaddy', [
'linux-x86_64',
'linux-aarch64',
Expand Down
17 changes: 17 additions & 0 deletions src/Package/Artifact/rust.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@

class rust
{
/** Install prefix the rust tarball's install.sh writes into. */
public static function path(): string
{
return PKG_ROOT_PATH . '/rust';
}

/** Path to a binary inside the rust install dir (cargo, rustc, rustup, …). */
public static function binary(string $name = 'cargo'): string
{
return self::path() . '/bin/' . $name;
}

public static function isInstalled(): bool
{
return is_file(self::binary());
}

#[CustomBinary('rust', [
'linux-x86_64',
'linux-aarch64',
Expand Down
17 changes: 17 additions & 0 deletions src/Package/Artifact/zig.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@

class zig
{
/** Directory zig extracts into. */
public static function path(): string
{
return PKG_ROOT_PATH . '/zig';
}

/** Path to a binary inside the zig install dir (zig, zig-cc, zig-c++, zig-ar, …). */
public static function binary(string $name = 'zig'): string
{
return self::path() . '/' . $name;
}

public static function isInstalled(): bool
{
return is_file(self::binary());
}

#[CustomBinary('zig', [
'linux-x86_64',
'linux-aarch64',
Expand Down
Loading