1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 21:11:34 +03:00
mobile-nixos/boot/splash/default.nix
Samuel Dionne-Riel 6cd2985bc1 boot/splash: Implement progress status display
The splash is now an application that should be started and forked from.
Once started, it will listen for messages on a ZeroMQ socket reporting
progress.

The current protocol is extremely simple, reporting (optional) label,
and reporting a progress amount.

Additionally, it responds to a string commant ("quit") to quit as
needed.
2020-11-06 16:30:22 -05:00

23 lines
550 B
Nix

{ runCommand
, lib
, mruby
}:
# mkDerivation will append something like -aarch64-unknown-linux-gnu to the
# derivation name with cross, which will break the mruby code loading.
# Since we don't need anything from mkDerivation, really, let's use runCommand.
runCommand "boot-splash.mrb" {
src = lib.cleanSource ./.;
lib = lib.cleanSource ../recovery-menu/lib;
nativeBuildInputs = [
mruby
];
} ''
mrbc \
-o $out \
$(find $lib -type f -name '*.rb' | sort) \
$(find $src/lib -type f -name '*.rb' | sort) \
$src/main.rb
''