From 6e4b7f896c16a4272bbff1a3305d1e5179a01156 Mon Sep 17 00:00:00 2001 From: Kyle Lacy Date: Sun, 1 Dec 2024 23:27:08 -0800 Subject: [PATCH] Add `pstack` package (#145) * Add `pstack` package * Clean up code in `pstack` package --- packages/pstack/brioche.lock | 8 ++++++++ packages/pstack/project.bri | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 packages/pstack/brioche.lock create mode 100644 packages/pstack/project.bri diff --git a/packages/pstack/brioche.lock b/packages/pstack/brioche.lock new file mode 100644 index 0000000..3faad3a --- /dev/null +++ b/packages/pstack/brioche.lock @@ -0,0 +1,8 @@ +{ + "dependencies": {}, + "git_refs": { + "https://github.com/peadar/pstack.git": { + "v2.8.3": "a83d4b95e6bc2c62fae97ca9f9785fc7133a9fdb" + } + } +} diff --git a/packages/pstack/project.bri b/packages/pstack/project.bri new file mode 100644 index 0000000..3c9256f --- /dev/null +++ b/packages/pstack/project.bri @@ -0,0 +1,33 @@ +import * as std from "std"; +import { cmakeBuild } from "cmake"; +import { gitCheckout } from "git"; + +export const project = { + name: "pstack", + version: "2.8.3", +}; + +const gitRef = Brioche.gitRef({ + repository: "https://github.com/peadar/pstack.git", + ref: `v${project.version}`, +}); + +const source = gitCheckout(gitRef); + +export default async function pstack(): Promise> { + return cmakeBuild({ + source, + config: "RelWithDebInfo", + dependencies: [std.toolchain()], + set: { + VERSION_TAG: (await gitRef).commit, + }, + runnable: "bin/pstack", + }); +} + +export function test() { + return std.runBash` + pstack --version | tee "$BRIOCHE_OUTPUT" + `.dependencies(pstack()); +}