2020-05-28 01:27:40 +03:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, mruby
|
|
|
|
}:
|
|
|
|
|
2021-01-02 02:45:45 +03:00
|
|
|
let
|
|
|
|
inherit (lib) concatMapStringsSep;
|
|
|
|
|
|
|
|
# Select libs we need from the libs folder.
|
|
|
|
libs = concatMapStringsSep " " (name: "${../../../boot/lib}/${name}") [
|
|
|
|
"lvgui/args.rb"
|
|
|
|
"lvgui/fiddlier.rb"
|
|
|
|
"lvgui/lvgl/*.rb"
|
|
|
|
"lvgui/lvgui/*.rb"
|
|
|
|
"lvgui/vtconsole.rb"
|
|
|
|
];
|
|
|
|
in
|
|
|
|
|
2020-05-28 01:27:40 +03:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "hello-gui.mrb";
|
|
|
|
|
|
|
|
src = lib.cleanSource ./.;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
mruby
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2021-01-01 04:50:01 +03:00
|
|
|
mrbc \
|
|
|
|
-o app.mrb \
|
2021-01-02 02:45:45 +03:00
|
|
|
${libs} \
|
2020-05-31 02:28:42 +03:00
|
|
|
$(find ./windows -type f -name '*.rb' | sort) \
|
2020-05-28 01:27:40 +03:00
|
|
|
main.rb
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/libexec/
|
|
|
|
mv -v app.mrb $out/libexec/
|
|
|
|
|
|
|
|
mkdir -p $out/share/hello-gui
|
|
|
|
'';
|
|
|
|
}
|