mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2025-01-06 03:27:17 +03:00
boot/recovery-menu: Use mkLVGUIApp
This commit is contained in:
parent
4e2cd380a0
commit
0a397decfe
@ -1,36 +1,12 @@
|
|||||||
{ runCommandNoCC
|
{ lib, runCommandNoCC, mobile-nixos }:
|
||||||
, lib
|
|
||||||
, mruby
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
mobile-nixos.mkLVGUIApp {
|
||||||
inherit (lib) concatMapStringsSep;
|
name = "boot-recovery-menu.mrb";
|
||||||
|
executablePath = "libexec/boot-recovery-menu.mrb";
|
||||||
# Select libs we need from the libs folder.
|
|
||||||
libs = concatMapStringsSep " " (name: "${../lib}/${name}") [
|
|
||||||
"hal/reboot_modes.rb"
|
|
||||||
"init/configuration.rb"
|
|
||||||
"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-recovery-menu.mrb" {
|
|
||||||
src = lib.cleanSource ./.;
|
src = lib.cleanSource ./.;
|
||||||
|
rubyFiles = [
|
||||||
nativeBuildInputs = [
|
"${../lib}/hal/reboot_modes.rb"
|
||||||
mruby
|
"${../lib}/init/configuration.rb"
|
||||||
|
"main.rb"
|
||||||
];
|
];
|
||||||
} ''
|
}
|
||||||
mrbc \
|
|
||||||
-o $out \
|
|
||||||
${libs} \
|
|
||||||
$src/main.rb
|
|
||||||
''
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
{ stdenv
|
|
||||||
, lib
|
|
||||||
, callPackage
|
|
||||||
, mrbgems
|
|
||||||
, mruby
|
|
||||||
, mobile-nixos
|
|
||||||
}:
|
|
||||||
|
|
||||||
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-recovery-menu-simulator";
|
|
||||||
version = "0.0.1";
|
|
||||||
name = "${pname}-${version}";
|
|
||||||
})
|
|
@ -134,7 +134,7 @@ in
|
|||||||
|
|
||||||
autoport = callPackage ./mobile-nixos/autoport {};
|
autoport = callPackage ./mobile-nixos/autoport {};
|
||||||
|
|
||||||
boot-recovery-menu-simulator = callPackage ../boot/recovery-menu/simulator.nix {};
|
boot-recovery-menu-simulator = self.mobile-nixos.stage-1.boot-recovery-menu.simulator;
|
||||||
boot-splash-simulator = self.mobile-nixos.stage-1.boot-splash.simulator;
|
boot-splash-simulator = self.mobile-nixos.stage-1.boot-splash.simulator;
|
||||||
|
|
||||||
fdt-forward = callPackage ./mobile-nixos/fdt-forward {};
|
fdt-forward = callPackage ./mobile-nixos/fdt-forward {};
|
||||||
|
Loading…
Reference in New Issue
Block a user