nix: build Limine in Nix

This packages Limine in Nix and exports it via the Nix Flake.
Due to the nature of the project, i.e., the self-hacked
"git submodule checkout with additional patches" in `./bootstrap`,
packing this in a Nix-way is very complicated.

The big advantage of packaging Limine in Nix directly as part
of the flake (additionally to nixpkgs) is that instead of using a
fixed version from nixpkgs coming from a Limine release, one can
use the current source and build everything in Nix.
This commit is contained in:
Philipp Schuster
2024-01-31 16:43:26 +01:00
parent 06e0e14fed
commit d320199530
5 changed files with 191 additions and 9 deletions

View File

@@ -29,3 +29,21 @@ jobs:
- name: Build the bootloader (GNU, riscv64)
run: ./bootstrap && ./configure TOOLCHAIN_FOR_TARGET=riscv64-linux-gnu --enable-werror --enable-uefi-riscv64 && make all && make maintainer-clean
build_nix:
name: Build with Nix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build .#limine
build_nix_shell:
name: Build with Nix shell toolchain
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix develop --command bash -c "./bootstrap && ./configure --enable-all && make -j $(nproc)"