2020-10-24 07:02:02 +03:00
|
|
|
{ runCommand
|
|
|
|
, lib
|
|
|
|
, mruby
|
|
|
|
}:
|
|
|
|
|
2021-01-02 01:49:38 +03:00
|
|
|
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/vtconsole.rb"
|
|
|
|
];
|
|
|
|
in
|
|
|
|
|
2020-10-24 07:02:02 +03:00
|
|
|
# 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 ./.;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
mruby
|
|
|
|
];
|
|
|
|
} ''
|
|
|
|
mrbc \
|
|
|
|
-o $out \
|
2021-01-02 01:49:38 +03:00
|
|
|
${libs} \
|
2021-01-02 04:49:44 +03:00
|
|
|
$src/ui.rb \
|
2020-10-24 07:02:02 +03:00
|
|
|
$src/main.rb
|
|
|
|
''
|