Skip to content

Commit f579613

Browse files
committed
+gum
1 parent 7be368e commit f579613

File tree

5 files changed

+43
-1
lines changed

5 files changed

+43
-1
lines changed

projects/charm.sh/gum/build.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { BuildOptions } from "brewkit";
2+
import unarchive from "../../../brewkit/unarchive.ts";
3+
4+
export default async function({ prefix, version }: BuildOptions) {
5+
6+
const arch = (() => {
7+
switch (Deno.build.target) {
8+
case "x86_64-unknown-linux-gnu":
9+
return "Linux_x86_64";
10+
case "aarch64-unknown-linux-gnu":
11+
return "Linux_arm64";
12+
case "x86_64-apple-darwin":
13+
return "Darwin_x86_64";
14+
case "aarch64-apple-darwin":
15+
return "Darwin_arm64";
16+
case "x86_64-pc-windows-msvc":
17+
return "Windows_x86_64";
18+
default:
19+
throw new Error(`Unsupported platform: ${Deno.build.target}`);
20+
}
21+
})();
22+
23+
await unarchive(`https://github.com/charmbracelet/gum/releases/download/v${version}/gum_${version}_${arch}.tar.gz`)
24+
prefix.bin.install("gum");
25+
}

projects/charm.sh/gum/fixup.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export default function() {
2+
// strip fails with weird error
3+
return false;
4+
}

projects/charm.sh/gum/package.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name:
2+
Gum
3+
4+
repository:
5+
https://github.com/charmbracelet/gum
6+
7+
programs:
8+
- bin/gum

projects/charm.sh/gum/test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { run } from "brewkit";
2+
3+
export default function() {
4+
run`gum --version`;
5+
}

projects/gnu.org/bison/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { BuildOptions, env_include, run, unarchive } from "brewkit";
22

33
export default async function ({ prefix, tag }: BuildOptions) {
4-
await unarchive(`https://ftp.gnu.org/gnu/bison/bison-${tag.slice(1)}.tar.xz`);
4+
await unarchive(`https://ftp.gnu.org/gnu/bison/bison-${tag.slice(1)}.tar.gz`);
55

66
// for fuck knows reasons this is required or the resulting bison on linux
77
// fails in use

0 commit comments

Comments
 (0)