1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2025-01-06 03:27:17 +03:00
mobile-nixos/boot/splash/default.nix
2021-07-19 15:50:06 -04:00

36 lines
753 B
Nix

{ runCommandNoCC
, lib
, mruby
}:
let
inherit (lib) concatMapStringsSep;
# Select libs we need from the libs folder.
libs = concatMapStringsSep " " (name: "${../lib}/${name}") [
"lvgui/args.rb"
"lvgui/fiddlier.rb"
"lvgui/lvgl/*.rb"
"lvgui/lvgui/*.rb"
"lvgui/mobile_nixos/*.rb"
"lvgui/vtconsole.rb"
];
in
# 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 runCommandNoCC.
runCommandNoCC "boot-splash.mrb" {
src = lib.cleanSource ./.;
nativeBuildInputs = [
mruby
];
} ''
mrbc \
-o $out \
${libs} \
$src/ui.rb \
$src/main.rb
''