From 62ad0e2dce930e896a6b7bfa28929560ac2d14ce Mon Sep 17 00:00:00 2001 From: sunglocto Date: Sun, 2 Aug 2026 20:41:03 +0000 Subject: [PATCH] Add Compiling on *NIX systems --- Compiling-on-%2ANIX-systems.md | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Compiling-on-%2ANIX-systems.md diff --git a/Compiling-on-%2ANIX-systems.md b/Compiling-on-%2ANIX-systems.md new file mode 100644 index 0000000..081935d --- /dev/null +++ b/Compiling-on-%2ANIX-systems.md @@ -0,0 +1,46 @@ +_Lambda has not been compiled on macOS at the time of writing. If you have a macOS system and you want to give some information, please get in touch._ + +Compiling Lambda on *NIX systems consists of installing the required dependencies, cloning the repository and building Lambda. + +## Dependencies + +You need a Go compiler, at the time of writing 1.25.5. Depending on your platform Go may be able to fetch and compile a newer version even if you are using a version below 1.25.5. + +Almost all *NIX distributions have Go in their repositories. If for whatever reason you cannot use those then you can get Go from the [official website](https://go.dev/). + +A C compiler is also required because Lambda uses GTK4. + +The following dependencies are required to be installed before compilation: + +- glib-2.0 +- gobject-2.0 +- cairo +- cairo-gobject +- gio-2.0 +- gobject-introspection +- gdk-pixbuf-2.0 +- graphene-gobject-1.0 +- graphene-1.0 +- gtk4 + +Some of these packages may be listed under different names on different distributions. + +If you are running a modern X11/Wayland system with GTK apps, then all of these packages should already be installed, and simply installing `gtk4` will suffice. If not, you can install them with your local package manager. + +Other than the GTK4-related dependencies, no other dependencies are required. + +## Cloning + +```bash +git clone https://forge.sunglocto.net/lambda/ +``` + +## Building + +If you are not compiling Lambda in order to test a code change, or are doing so for regular usage, you should strip debug information by using the -s -w flags: + +```bash +go build -ldflags "-s -w" +``` + +Otherwise, simply run `go build`. \ No newline at end of file