aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/cmake.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/internal/rosa/cmake.go b/internal/rosa/cmake.go
new file mode 100644
index 00000000..3468d1d8
--- /dev/null
+++ b/internal/rosa/cmake.go
@@ -0,0 +1,31 @@
+package rosa
+
+import "hakurei.app/internal/pkg"
+
+// NewCMake returns a [pkg.Artifact] containing an installation of CMake.
+func (t Toolchain) NewCMake() pkg.Artifact {
+ const (
+ version = "4.2.1"
+ checksum = "Y3OdbMsob6Xk2y1DCME6z4Fryb5_TkFD7knRT8dTNIRtSqbiCJyyDN9AxggN_I75"
+ )
+ return t.New("cmake-"+version, []pkg.Artifact{
+ t.NewMake(),
+ t.NewKernelHeaders(),
+ }, nil, nil, `
+# expected to be writable in the copy made during bootstrap
+chmod -R +w /usr/src/cmake/Tests
+
+cd "$(mktemp -d)"
+/usr/src/cmake/bootstrap \
+ --prefix=/system -- \
+ -DCMAKE_USE_OPENSSL=OFF
+make "-j$(nproc)"
+make DESTDIR=/work install
+`, pkg.Path(AbsUsrSrc.Append("cmake"), true,
+ pkg.NewHTTPGetTar(
+ nil, "https://github.com/Kitware/CMake/releases/download/"+
+ "v"+version+"/cmake-"+version+".tar.gz",
+ mustDecode(checksum),
+ pkg.TarGzip,
+ )))
+}