2024-10-03 16:59:48 +00:00
|
|
|
# Building Isle
|
|
|
|
|
|
|
|
Building from source requires [nix][nix].
|
|
|
|
|
|
|
|
(*NOTE* The first time you run some of these builds a lot of things will be
|
|
|
|
built from scratch. If you have not otherwise configured it, nix might be using
|
|
|
|
a tmpfs as its build directory, and the capacity of this tmpfs will probably be
|
|
|
|
exceeded by this build. You can change your build directory to somewhere on-disk
|
|
|
|
by setting the TMPDIR environment variable for `nix-daemon` (see [this github
|
|
|
|
issue][tmpdir-gh].))
|
|
|
|
|
|
|
|
[nix]: https://nixos.wiki/wiki/Nix_package_manager
|
|
|
|
[tmpdir-gh]: https://github.com/NixOS/nix/issues/2098#issuecomment-383243838
|
|
|
|
|
|
|
|
## Current System
|
|
|
|
|
|
|
|
You can build an AppImage for your current system by running the following from
|
|
|
|
the project's root:
|
|
|
|
|
|
|
|
```
|
2024-11-03 14:23:43 +00:00
|
|
|
nix-build -A build.appImage
|
2024-10-03 16:59:48 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
The resulting binary can be found under `result/bin`.
|
|
|
|
|
|
|
|
## Cross-Compile
|
|
|
|
|
|
|
|
An AppImage can be cross-compiled by passing the `hostSystem` argument:
|
|
|
|
|
|
|
|
```
|
2024-11-03 14:23:43 +00:00
|
|
|
nix-build --argstr hostSystem "x86_64-linux" -A build.appImage
|
2024-10-03 16:59:48 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Supported system strings are enumerated in `nix/pkgs.nix`.
|
2024-11-03 14:23:43 +00:00
|
|
|
|
|
|
|
## Alternative Build Targets
|
|
|
|
|
|
|
|
Besides AppImage, Isle supports building alternative package types which are
|
|
|
|
targetted at different specific operating systems. Each of these has its own
|
|
|
|
`build.*` target.
|
|
|
|
|
|
|
|
* AppImage (all OSs): `nix-build -A build.appImage`
|
|
|
|
* Arch Linux package: `nix-build -A build.archPkg`
|
|
|
|
|
|
|
|
All targets theoretically support passing in a `hostSystem` argument to
|
|
|
|
cross-compile to a different architecture or OS, but some targets may not make
|
|
|
|
sense with some `hostSystem` values.
|