mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-11 09:04:01 +03:00
boot/splash: Use mkLVGUIApp
This commit is contained in:
parent
9df0e1bbdf
commit
11f982bf97
@ -1,35 +1,19 @@
|
||||
{ runCommandNoCC
|
||||
, lib
|
||||
, mruby
|
||||
}:
|
||||
{ lib, runCommandNoCC, mobile-nixos }:
|
||||
|
||||
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"
|
||||
];
|
||||
assets = runCommandNoCC "boot-splash-assets" {} ''
|
||||
mkdir -p $out
|
||||
cp ${../../artwork/logo/logo.white.svg} $out/logo.svg
|
||||
'';
|
||||
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" {
|
||||
mobile-nixos.mkLVGUIApp {
|
||||
name = "boot-splash.mrb";
|
||||
executablePath = "libexec/boot-splash.mrb";
|
||||
src = lib.cleanSource ./.;
|
||||
|
||||
nativeBuildInputs = [
|
||||
mruby
|
||||
rubyFiles = [
|
||||
"ui.rb"
|
||||
"main.rb"
|
||||
];
|
||||
} ''
|
||||
mrbc \
|
||||
-o $out \
|
||||
${libs} \
|
||||
$src/ui.rb \
|
||||
$src/main.rb
|
||||
''
|
||||
inherit assets;
|
||||
assetsPath = "boot-splash/assets";
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
{ mobile-nixos
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
let
|
||||
script-loader = mobile-nixos.stage-1.script-loader.override({
|
||||
withSimulator = true;
|
||||
});
|
||||
applet = callPackage ./. {};
|
||||
in
|
||||
(script-loader.wrap {
|
||||
name = "simulator";
|
||||
inherit applet;
|
||||
}).overrideAttrs(old: rec {
|
||||
pname = "boot-splash-simulator";
|
||||
version = "0.0.1";
|
||||
name = "${pname}-${version}";
|
||||
})
|
@ -135,7 +135,7 @@ in
|
||||
autoport = callPackage ./mobile-nixos/autoport {};
|
||||
|
||||
boot-recovery-menu-simulator = callPackage ../boot/recovery-menu/simulator.nix {};
|
||||
boot-splash-simulator = callPackage ../boot/splash/simulator.nix {};
|
||||
boot-splash-simulator = self.mobile-nixos.stage-1.boot-splash.simulator;
|
||||
|
||||
fdt-forward = callPackage ./mobile-nixos/fdt-forward {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user